Error Catching

P

Patrick Graham

I forget how to catch an error and display a customized
message.

I want to basically ask a question and on the yes no
response take an action.

Thanks ahead of time.
 
K

Ken Snell

Which part do you need help doing? Trapping the error? Or displaying a
message that can be answered?

There are many ways to trap errors; the best approach depends upon the type
of error that you want to trap, as different approaches are better for
different errors.

Can you give us a bit more info?


A generic reply is this:


On Error GoTo Err_Sub
DoCmd.OpenForm "FormName"
Exit Sub

Err_Sub:
If vbNo = MsgBox("An error occurred. Retry?", vbQuestion + vbYesNo) Then
Exit Sub
Resume
 
D

dank57

Are you looking to catch code error or data input error?

email me because I may not check back.
 

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