B
Bill
With this code (below), my intent is to pass the
filter to the report. I assumed that this form of
OpenReport would automatically cause the
reports FilterOn property to become TRUE
and that the filter expression would be
assigned to the reports Filter.
Debug code in the report's OnOpen code
reveals: Me.Filter = "" and
Me.FilterOn = False
The table field is either "Spring" or "Fall"
and is of the form: "aa-nnnn". So, I'm
looking to have the RecordSource filtered
to "Spring" or "Fall" to have a dash "-" as
the distinguishing characteristic.
===========(Begin Code)========
Private Sub cmdPrintInvite_Click()
Dim InviteParms As String
Dim strFilter As String
With Me
InviteParms = .RetDate & ";" & .PayTo & ";" & .[ID-SendTo] & ";" &
..PayAmt & ";"
InviteParms = InviteParms & .RecBy & ";" & .txtRegards
End With
strFilter = Season & " Like ""-"""
DoCmd.OpenReport "rptInvitation", acViewPreview, , strFilter, , InviteParms
DoCmd.RunCommand acCmdZoom100
End Sub
===========(End Code)========
filter to the report. I assumed that this form of
OpenReport would automatically cause the
reports FilterOn property to become TRUE
and that the filter expression would be
assigned to the reports Filter.
Debug code in the report's OnOpen code
reveals: Me.Filter = "" and
Me.FilterOn = False
The table field is either "Spring" or "Fall"
and is of the form: "aa-nnnn". So, I'm
looking to have the RecordSource filtered
to "Spring" or "Fall" to have a dash "-" as
the distinguishing characteristic.
===========(Begin Code)========
Private Sub cmdPrintInvite_Click()
Dim InviteParms As String
Dim strFilter As String
With Me
InviteParms = .RetDate & ";" & .PayTo & ";" & .[ID-SendTo] & ";" &
..PayAmt & ";"
InviteParms = InviteParms & .RecBy & ";" & .txtRegards
End With
strFilter = Season & " Like ""-"""
DoCmd.OpenReport "rptInvitation", acViewPreview, , strFilter, , InviteParms
DoCmd.RunCommand acCmdZoom100
End Sub
===========(End Code)========