Opening a report results in error (1 Viewer)

bayman

Registered User.
Local time
Today, 23:10
Joined
May 25, 2001
Messages
96
I'm attempting to open a report with a simple command:

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.
 

Cronk

Registered User.
Local time
Tomorrow, 10:10
Joined
Jul 4, 2013
Messages
2,770
"Anyone have an idea as to why this might be happening?"

No, not with the negligible amount of information provided.

Did you try opening the report without the preview? Does the report contain any code? What is the recordsource for the report?
 

bayman

Registered User.
Local time
Today, 23:10
Joined
May 25, 2001
Messages
96
"Anyone have an idea as to why this might be happening?"

No, not with the negligible amount of information provided.

Did you try opening the report without the preview? Does the report contain any code? What is the recordsource for the report?


Tried opening without preview. Same error.

Report contains no code.

Recordsource is a linked SQL table.
 

sneuberg

AWF VIP
Local time
Today, 16:10
Joined
Oct 17, 2014
Messages
3,506
Probably won't help but try a compact and repair.
 

AccessBlaster

Registered User.
Local time
Today, 16:10
Joined
May 22, 2010
Messages
5,827
I'm attempting to open a report with a simple command:

Code:
DoCmd.OpenReport "rptName", acViewPreview
Thanks in advance.
Do you really have a report named rptName?
 

Users who are viewing this thread

Top Bottom