indyng
asked on
What is the code to open a report and have it displayed as "fit" in a window?
Hi Experts,
I require a code that will open a report and make the report display as fit.
Thanks
I require a code that will open a report and make the report display as fit.
Thanks
Put this code behind a button
DoCmd.OpenReport "rptReportName"
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom75
There isn't a zoom fit, 75% is pretty close
Mike
DoCmd.OpenReport "rptReportName"
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom75
There isn't a zoom fit, 75% is pretty close
Mike
ASKER
Can I do this?
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdZoomFit
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdZoomFit
ASKER
This way
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdFitToWindow
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdFitToWindow
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is to open the report in view mode
DoCmd.OpenReport "ReportName", acViewPreview
If what you mean it doesnt fit in th page you have to play with marging in the Page setup menu
Álvaro