C
Clif McIrvin
My environment is XP Pro SP2, Access 2003 SP3 w/Hotfix using DAO 3.6.
I'm having trouble with a validation routine in a control's before
update event.
The control in question is bound to an indexed text field:
Required = Yes
Zero length = No
Allow Duplicates = No.
The validation I'm attempting could be left to Access, but I'd prefer my
own error popups to the "Too much information for a user" error text
that Access supplies.
When I detect a violation, I display a MsgBox, set Cancel = True and
exit the function. To my surprise, Access seems to be ignoring the
Cancel = True and displays its own error message.
Part two of my question: I would like to reset the control in question
to empty as a visual cue, but Access insists that I'm violating data
integrity rules: it returns error 2115,
"The macro or function set to the BeforeUpdate or ValidationRule
property for this field is preventing Microsoft Office Access from
saving the data in the field."
Any suggestions?
I'm having trouble with a validation routine in a control's before
update event.
The control in question is bound to an indexed text field:
Required = Yes
Zero length = No
Allow Duplicates = No.
The validation I'm attempting could be left to Access, but I'd prefer my
own error popups to the "Too much information for a user" error text
that Access supplies.
When I detect a violation, I display a MsgBox, set Cancel = True and
exit the function. To my surprise, Access seems to be ignoring the
Cancel = True and displays its own error message.
Part two of my question: I would like to reset the control in question
to empty as a visual cue, but Access insists that I'm violating data
integrity rules: it returns error 2115,
"The macro or function set to the BeforeUpdate or ValidationRule
property for this field is preventing Microsoft Office Access from
saving the data in the field."
Any suggestions?