Report Print Preview in Access 2007

  • Thread starter Thread starter neeses
  • Start date Start date
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.
 
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
 
Back
Top