View Single Post
  #2  
Old June 1st, 2010, 05:17 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Replace "assign the null value" message

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