I'm attempting to open a report with a simple command:
Executing the command results in a 2501 error. If I open the report from the Navigation Pane, it opens as expected. I'm using Access 2010. I've added code to ignore the 2501 error, which results in nothing happening. Anyone have an idea as to why this might be happening?
Thanks in advance.
Code:
DoCmd.OpenReport "rptName", acViewPreview
Executing the command results in a 2501 error. If I open the report from the Navigation Pane, it opens as expected. I'm using Access 2010. I've added code to ignore the 2501 error, which results in nothing happening. Anyone have an idea as to why this might be happening?
Thanks in advance.