ClaraBarton
Registered User.
- Local time
- Yesterday, 19:44
- Joined
- Oct 14, 2019
- Messages
- 706
@Pat Hartman
I'm trying to use Pat's label printing code. When I open the report from a form I use
The report immediately starts printing and does not hit the Open code in the report.
I'm trying to use Pat's label printing code. When I open the report from a form I use
Code:
DoCmd.OpenReport strReport, acViewNormal, _
OpenArgs:=Me.Name & "|" & Skip
The report immediately starts printing and does not hit the Open code in the report.
Code:
Private CallingForm As String
Dim intBlankCount As Integer
Dim Skip As Integer
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If intBlankCount < Skip Then
Me.NextRecord = False
Me.PrintSection = False
intBlankCount = intBlankCount + 1
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
Dim strFilter As String
strFilter = Forms.frmUtility.fsubUtility.Form.Filter
If Not IsNull(Me.OpenArgs) Then
CallingForm = Left(OpenArgs, InStr(OpenArgs, "|") - 1)
Skip = Mid(OpenArgs, InStr(OpenArgs, "|") + 1)
End If
Me.RecordSource = "qryUtility Where " & strFilter
Me.CurrentView = 5
End Sub