bypass data validation

hi there

Registered User.
Local time
Yesterday, 19:54
Joined
Sep 5, 2002
Messages
171
hi folks,

i have a table with numeric data validation rules for a number of fields. this application is used as a log sheet to store monitoring values for measured parameters. the data valdiation rules i placed in the fields should apply 99% of the time, but there are some instances when one of the measured parameters might be out of the range. to account for this i added a comments memo field for users to record values that they cannot enter into the text boxes on the corresponding entry form. the problem i'm running into is when a user tries to enter a invalid entry into the text box, access won't let them leave the text box until they enter a valid value. what happens is the user ends up having to close the form and gets the "you can't save record at this time" dialog box and loses all of the data they previously entered and has to start over. is there a way to get around this. i'm using Access 97 and all of my fields with data validation have the Required property set to "No". thanks for any suggestions.
 
Remove the validation rules from the table. Do your validating in the control or forms Before Update event. Doing this will allow you to make decisions (using code) that your current setup does not allow. Search help for Before Update for a small code example.

hth,
Jack
 
The esc key should bring a field back to its unedited state. Or, you can do it in code with Me.SomeField.Undo. Hitting the esc key twice, returns a record back to its unedited state and in code you can do it with Me.Undo.
 

Users who are viewing this thread

Back
Top Bottom