Open Report In Fit To Screen

D

doyle60

I want to open a report in fit to screen. The code I found on the
Internet didn't quite work for me. How is this done?

Matt
 
R

Rick Brandt

I want to open a report in fit to screen. The code I found on the
Internet didn't quite work for me. How is this done?

One difficulty is that the code to "fit to window" cannot be executed in the
report's own code module. You have to call it in the same code that opens the
report.

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.RunCommand acCmdFitToWindow

I would usually include...

DoCmd.Maximize

....in the Report's Open Event.
 
D

doyle60

Thanks so much. And thanks for the explanation. I did put it in the
wrong place.

Matt
 
Top