Auto fill error trapping code into a procedure

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top