Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I set the zoom at 100% 3

Status
Not open for further replies.

Taecca

Technical User
Jul 20, 2004
59
US
When I open my reports I always need to click on them first to set the zoom to 100%.
Is there a way to make the reports open at 100% zoom?

 
Posted here by someone else
in the Form that you use to open the report, add additional code afte the command to open the report as in this example (you can see where I've commented out the command which would open zoomed to 75%)... Then in the REPORT's On Close Event
add .... DoCmd.Restore.. which will take you back from the Maximized window state.

With DoCmd
.OpenReport "YourReportName", acViewPreview
'.RunCommand acCmdZoom75
.RunCommand acCmdFitToWindow
.Maximize
End With


Hope this helps
Hymn
 
Thank you for your reply.
I've modified the code as follows but it still does not open up correctly.I wish to open it at 100%

Private Sub cmd_R1_Click()
On Error GoTo Err_cmd_R1_Click

Dim stDocName As String

stDocName = "R1"
DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdZoom110


Exit_cmd_R1_Click:
Exit Sub

Err_cmd_R1_Click:
MsgBox Err.Description
Resume Exit_cmd_R1_Click

End Sub
 
Ops..sorry. Got it:

DoCmd.OpenReport stDocName, acPreview


DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow

DoCmd.RunCommand acCmdZoom100

Thank you :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top