Zoom problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

From a command button on a form I have the following code to open a report:
DoCmd.OpenReport "rptRouteMilesByTen", acViewPreview

In the reports On Open code I want the report to zoom to 100% but I get an
error:

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

I get an error in the RunCommand line of the above code. What's wrong?
Thank you
 
That's too early to run the zoom command.
Even the report's Activate event is too early.

If you open the report programmatically, you could try it after the report
opens:
DoCmd.OpenReport "Report1", acViewPreview
DoCmd.RunCommand acCmdZoom100
 
Back
Top