error 2501 openreport action help!

pattyt

Registered User.
Local time
Today, 05:59
Joined
Aug 10, 2001
Messages
13
I have a form which brings up a list box of all my reports. This formOne has a button to preview the report with the code

DoCmd.OpenReport Me!lstReports.Value, acPreview

It works great, however some of my reports have a user input box form that popups for the criteria. This popup form has a button "Cancel". If the user clicks the cancel button I get
runtime error 2501:
The openReport action was canceled.

End Debug Help

I search your files for error code 2501 but I don't understand where the code for erros goes. Does it go on the first form on my preview button or the second popup form on the cancel button? and how do I word it. The only code on the cancel button is docmd.close. I've tried several times and still get the error message. I am stuck and feel dumb. Please help me!
 

Users who are viewing this thread

Back
Top Bottom