June 16th, 2011, 10:33 AM
Join Date: Jun 2011
Time spent in forums: 54 m 56 sec
Reputation Power: 0
You'll have to catch the relevant error number and handle it as you wish, likely in a Form_error sub.
Private Sub Form_Error(DataErr As Integer, Response As Integer)
' sub to catch all form errors
Const errRequired = 3314
'3314 is the error number for missing mandatory data.
If DataErr = errRequired Then
' if the current error is 3314
MsgBox ("Enter your first name")
' custom error message
Response = acDataErrContinue
' dont show the generic message
Response = acDataErrDisplay
'Not a missing data error, so just show generic message.