access2010
Registered User.
- Local time
- Today, 12:09
- Joined
- Dec 26, 2009
- Messages
- 1,115
I am trying to preview a report before printing which uses the following code for printing;
‘= = = Old Code = = =
Private Sub cmdPrint_Click()
Dim repFilter As String
If IsNull(Me.cmbFindAccountYearMOR) = True Then
Exit Sub
Else
repFilter = "[AccountingYear] = '" & CStr(cmbFindAccountYearMOR) & "'"
End If
DoCmd.OpenReport repName, acViewNormal, , repFilter
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
End Sub
‘ = = =
I normally use the code below to preview our reports prior to printing.
‘ = = = Preview Code = = =
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
‘= = =
Could I please have assistance in how to adjust the Old Code so that we can preview the print before printing?
Thank You
Nicole
‘= = = Old Code = = =
Private Sub cmdPrint_Click()
Dim repFilter As String
If IsNull(Me.cmbFindAccountYearMOR) = True Then
Exit Sub
Else
repFilter = "[AccountingYear] = '" & CStr(cmbFindAccountYearMOR) & "'"
End If
DoCmd.OpenReport repName, acViewNormal, , repFilter
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
End Sub
‘ = = =
I normally use the code below to preview our reports prior to printing.
‘ = = = Preview Code = = =
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
‘= = =
Could I please have assistance in how to adjust the Old Code so that we can preview the print before printing?
Thank You
Nicole