OpenReport action canceled

WineSnob

Not Bright but TENACIOUS
Local time
Yesterday, 19:28
Joined
Aug 9, 2010
Messages
211
I get the OpenReport action canceled when trying to open a report using
Code:
Private Sub Command21_Click()
DoCmd.OpenReport "rptNet Worth", acViewPreview
End Sub
The report opens fine directly from the database.:banghead:
 
DoCmd.OpenReport "ReportName", acViewPreview, , , acWindowNormal

You may need the last parts. I have opened reports without the acWindowNormal with no problem.
Are you sure the name is correct.
 
I tried that and yes the report name is correct. Still have the issue.
 
Error 2501 OpenReport action canceled.
Also I do not have any error handling code that is trapping it.
 
Rick,
There are some hits on error 2501in Google.

Try looking at some of them.

Most are getting this error from trying to make a PDF file.

Appears 2501is an error when Access has a problem with the query for the report.

Dale
 

Users who are viewing this thread

Back
Top Bottom