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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Needed to Maximize Reports

Status
Not open for further replies.

davesaint86

IS-IT--Management
Aug 23, 2007
10
US
When I click on the command button to open up my reports I have it setup where the reports now preview at 66%. My reports open up in the "Restore" mode. I would like my reports to open up in the "Maximize" mode. I copied the event procedure below that I'm using to open my reports. What code should I add so that my reports open up Maximized?
***********************************************************
Private Sub MasProg_SumRpt_Click()
On Error GoTo Err_MasProg_SumRpt_Click

Dim stDocName As String

stDocName = "Master (Prog) - Issues Summary Report"
DoCmd.OpenReport stDocName, acPreview
Reports(stDocName).ZoomControl = 66 'Open preview at 66%

Exit_Preview_Click:
Exit Sub

Err_Preview_Click:
MsgBox "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
Resume Exit_Preview_Click

Exit_MasProg_SumRpt_Click:
Exit Sub

Err_MasProg_SumRpt_Click:
MsgBox Err.Description
Resume Exit_MasProg_SumRpt_Click

End Sub
 
Or to streamline the code (rather than tell it to open at 66% and then maximize) Just remove this line:

Reports(stDocName).ZoomControl = 66 'Open preview at 66%


Kyle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top