Preview Fits

M

MikeC

Scott,

Yes. The below should work for you. You'll just need to replace
"YourReport" with your actual report name and put this code in the event
procedure that you use to open your report, like a button click event.

DoCmd.OpenReport "YourReport", acPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow
 
S

Scott C

Thanks!

That's just what I needed.

Scott
-----Original Message-----
Scott,

Yes. The below should work for you. You'll just need to replace
"YourReport" with your actual report name and put this code in the event
procedure that you use to open your report, like a button click event.

DoCmd.OpenReport "YourReport", acPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow





.
 
M

Marshall Barton

Scott said:
Is there a way to set the ,acPreview , to open in "Fit"
mode?


You have to add a line of code immediately after the
OpenReport line:

DoCmd.RunCommand acCmdFitToWindow
 
Top