code for opening a report (1 Viewer)

stefanocps

Registered User.
Local time
Today, 09:14
Joined
Jan 31, 2019
Messages
153
hello i need to pen a report from a button
i use this
DoCmd.OpenReport "Report", acViewPreview, "Report"


i would like to open the report in the same format as when i actually open the report , not in the print preview mode
Hod o i do that?


thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:14
Joined
Oct 29, 2018
Messages
21,357
Try using acViewReport instead of acViewPreview.
 

stefanocps

Registered User.
Local time
Today, 09:14
Joined
Jan 31, 2019
Messages
153
great!
thanks a lot!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:14
Joined
Oct 29, 2018
Messages
21,357
Hi. You're welcome! Good luck with your project.
 

Users who are viewing this thread

Top Bottom