Validation Rule Popup


J

jutlaux

I have created a validation rule and also a validation text that are both
working correctly. The problem I have is that if the validation rule is
violated my message appears, but then I generic Microsoft Office Access error
appear saying that "The value in the field or record violates the validation
rule for the record or field".

Since I created my own message box that gives a little for info how can I
prevent the generic popup from appearing?

Thanks!
 
Ad

Advertisements

J

Jeanette Cunningham

Hi jutlaux,
that error is coming from the form error event.
You can trap for the error there.

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

If DataErr = 2116 Then
Response = acDataErrContinue
Else
MsgBox DataErr & " " & Response
End If
End Sub

Note: it is probably dataerr no 2116, but could be 3316 or 3317


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top