Mach1pro
asked on
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
DoCmd.SetWarnings False 'turn off messages
....Your code here
DoCmd.SetWarnings True 'turn on messages
....Your code here
DoCmd.SetWarnings True 'turn on messages
ASKER
Please see Q_21404242.html
Me.Undo