I do not find default error handling to be especially useful, since it does
not necessarily identify the origin of the code that is triggering the
error. One approach I find helpful is to use generic names for Error and
Exit, rather than Form_Current_Err, etc. or whatever exactly Microsoft uses
by default with the wizard. With a minor modification the code can be
customized for any event. For instance, for the Form's Current event:
Private Sub Form_Current()
On Error GoTo ProcErr
' Your code
ProcExit:
Exit Sub
ProcErr:
msgbox "Error #" & Error.Number & ", " & Error.Description & " -
Form_Current"
Resume ProcExit
End Sub
The code can be pasted into the VB window, the end of the msgbox line
changed as needed, and then you can add your code where indicated. Any
error will include information about what triggered it.