Report Print Preview in Access 2007

N

neeses

Problem is I can set up a report under properties to open in Print Preview as
the default, but when I add it to the switchboard, it opens in Report view
instead. How can I get it to use Print Preview mode when users open the
report? Thank you for your time and assistance.
 
P

Paul Shapiro

Check the switchboard code. Look at the HandleButtonClick() routine. My
switchboard was originally created in an older Access version. That routine
contains a Select Case statement to process the various commans. The
relevant one in my code reads:
' Open a report.
Case conCmdOpenReport
DoCmd.OpenReport rst![Argument], acPreview
'Now size it to fit in it's window
DoCmd.SelectObject acReport, rst![Argument], False
RunCommand acCmdFitToWindow
Make sure yours has the acPreview argument included. If it's there and the
report still isn't opening in preview mode, you can try running that same
command in Immediate mode to make sure there isn't an issue with that
report:
DoCmd.OpenReport "YourReportName", acPreview
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top