Auto fill error trapping code into a procedure

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

Is it possible to make access automatically put in the following code when I
select the code builder option for an event?

Example:

Private Sub MyControl_Click()

'---Code that I want Access to automatically insert:

On Error GoTo ErrHandler

ExitHandler:
Exit Sub

ErrHandler:
MsgBox Err.Description

Resume ExitHandler

'----

End Sub
 
Back
Top