You can use the Form_Error event. Here's an example for a
single error, in this case the one you cited, I believe.
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 3314
MsgBox "your error message goes here"
Resonse = acDataErrContinue
Case Else
MsgBox Err.Number & " - " & Err.Description
End Select
Resonse = acDataErrContinue
End Sub
This code can be expanded to include other errors, and can even be modified
to pop up different messages for the same error, reflecting the actual
control that caused the error..
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
Message posted via
http://www.accessmonster.com