Suppress record update error message

I have a very simple table of usernames, passwords, and a few other fields.
I have a continuous form based on this table.
In the Before update event of the password field, I check for minimum length, maximum length, and non alphanumeric characters. If the password doesn't meet the criteria then I let the user know and then cancel the event.
    Msgbox "Invalid Password...etc."
    Cancel = True

Unfortuanately, after my message box is closed, Access pops up its own message box about "The value in the field or record violates the validation rule for the record or field"

How can I suppress this message so that the user can just correct the password field and continue on. It seems like it should be simple, but its driving me nuts.
Who is Participating?
DangerM0useConnect With a Mentor Commented:
Put this in the forms module:

Private Sub Form_Error(DataErr As Integer, Response As Integer)

    Response = 0
End Sub

...Good Luck
In the BeforeUpdate event enter:


DoCmd.SetWarnings False  'turn off messages

....Your code here

DoCmd.SetWarnings True  'turn on messages
Mach1proAuthor Commented:
Please see  Q_21404242.html
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.