Validation Messages

  • Thread starter Thread starter mduddy
  • Start date Start date
M

mduddy

Guest
I have a text field with validation to check for the presence of an apostrophe. If found, the validation text is set to give the user a specific message. This appears to work fine.

After the validation message is cleared, however, a second message window appsears with an MS Access message stating that "The value in the field or record violates the validation rule for the record or field....".

How do I stop this second message from appearing?

Thanks much,
Margaret
 
Take a look at "DoCmd.SetWarnings true or False," it may help.
 
u can catch the error number also:

if error=12345 then
msg"blah"
end if
exit sub
 
Thanks much for the feedback.

In the end I wound up using the OnKeyPress event and simply trapping for the invalid character there. A bit cleaner and don't have to worry about messaging problems.

Regards,
Margaret
 

Users who are viewing this thread

Back
Top Bottom