Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms vs. Tables

Status
Not open for further replies.

rutkus

Programmer
Aug 28, 2001
41
US
Perhaps I'm not doing something right BUT ive noticed that when i setup an if statement or some type of "validation" in a form, i can still bypass it by entering the data in datasheet. Is there any way to get the table to read the form validations?? Can you even use VB with the tables??

Just a sudden realization

Thanks
Omar Qureshy
DSC Networks

 
No. Tables cannot use VB (unless manipulated thro vb). As a rule, it is normally always a good idea to do any data entry via forms (that is what i have always been told).

Nick
 
Hi!

I assume the problem you get is from other users going directly to the table to enter data instead of using your form. To avoid this, you will probably need to disallow direct access to the tables. There are good FAQ's concerning how to lock down the DB so the users have to access the data only through your forms. There are even some good threads that will tell you how to design your own form to allow users to make there own custom queries. Obviously, this will entail a lot of work, so you will need to decide how important your data validation is.

hth
Jeff Bridgham
 
I think you can still have some validation done in datasheets if you define validation rules for the field in the table definition.

I'm sure that you can have "combo box" type validation by using lookups in the field definition. Look at the 'lookup' tab on the field definition properties in your table definition form. You can define lookups for the field so that, for example, you could use a combobox to link in an id field and a name field from a related table. Then even in the datasheet the user will be presented with a combo box with text names, and the underlying field in the main table can store the id field as an integer, just as when you're using combo boxes on forms. Choose limit to list for the combo box (I think you can), and you've got complete validation. This combo box validation might not be appropriate for all fields, but it can be very helpful for the ones where it is applicable.

As I said, I'm not sure, but I believe that the validation rule you define in the table definition also governs data added on datasheets. It's easy enough to check on that; sonmeone correct me if I'm wrong (I'll post a correction or confirmation myself if I get around to checking it).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top