T
thebiggermac via AccessMonster.com
I need to attach a custom error message to my forms. Each form has only one
required field hence the field cannot remain blank. I want to validate that
the field has data before the form is saved, but the cryptic message from
Access just doesn't work. I created a macro that I attached to the
BeforeUpdate property of the form (not the field) which works great EXCEPT
that I get another error message generated by Access itself.
Example:
My macro:
Macro Name: Hull_number
Condition: ([Hull_number]) Is Null
Action: CancelEvent
Action: Msgbox (with my custom error message)
Action: GoToControl: (send the cursor back to the appropriate field)
It works good when I test it but when I close my custom dialog box I get
another message from Access that says: "You canceled the previous operation."
How do I get rid of this second message box? No matter what I try I still get
it or the cryptic Access error message.
I am using Access 2000 so I don't know if this is a bug or just me.
Any suggestions?
required field hence the field cannot remain blank. I want to validate that
the field has data before the form is saved, but the cryptic message from
Access just doesn't work. I created a macro that I attached to the
BeforeUpdate property of the form (not the field) which works great EXCEPT
that I get another error message generated by Access itself.
Example:
My macro:
Macro Name: Hull_number
Condition: ([Hull_number]) Is Null
Action: CancelEvent
Action: Msgbox (with my custom error message)
Action: GoToControl: (send the cursor back to the appropriate field)
It works good when I test it but when I close my custom dialog box I get
another message from Access that says: "You canceled the previous operation."
How do I get rid of this second message box? No matter what I try I still get
it or the cryptic Access error message.
I am using Access 2000 so I don't know if this is a bug or just me.
Any suggestions?