Zooming Reports with VBA

G

Guest

Is there a VBA command or Database default setting that will make a report
open up with a preset zoom. If every time a report opens, I want it at 133%
zoom, or 255% zoom.

Any help is appreciated.
 
S

Steve Schapel

Access101,

You can use code like this, when opening a report preview...
DoCmd.RunCommand acCmdZoom200

However, the available zoom values are 10, 25, 50, 75, 100, 150, 200 ...
I am not sure how to get 133%.
 
G

Guest

Steve - thanks for the help. At first I tried this, but got the Error 2046 -
not available now:

Private Sub Report_Open(Cancel As Integer)
DoCmd.RunCommand acCmdZoom200
End Sub

But then I figured it out:

DoCmd.OpenReport "rptCrossCompanyRiskMitigation", acViewPreview
DoCmd.RunCommand acCmdZoom200

Thanks for your time and help.
 

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