Validation Rule not consistent

V

VBAgroupie

I'm validating data using the beforeupdate event on the object level. When i
run the form it works the first time but if i try validating using the next
record the rule doesn't fire. It goes back to the Microsoft error instead of
using my message i created. What would cause this? Any suggestions would be
helpful. I appreciate it! Thanks.
 
A

Allen Browne

Use the Error event of the Form to trap the engine-level error.

That does fire before the BeforeUpdate event. For example, if you set up a
BeforeUpdate event to make sure the date entered is not future:
Me.InvoiceDate <= Date()
but the user enters an invalid date:
33/33/2005
then the engine-level error will fire saying this entry is not suitable for
the data type. It makes sense that this is checked before your validation
rule or BeforeUpdate event proc.
 
Top