I can't figure out why a filter expression is not being passed to a report. In the segment of code below, I verify the contents of the filter string with a simple display:
Code:
Public Function lbl12()
MsgBox FilterName
DoCmd.OpenReport "lblAddrLabels12", acViewPreview, FilterName
End Function
Likewise, when the report opens:
Code:
Private Sub Report_Open(Cancel As Integer)
MsgBox Me.Filter
Me.FilterOn = True
End Sub
The filter is correct in the statement before the DoCmd, but empty when the filter is displayed when the report opens.
I don't know how much more simple this could be, yet I'm mystified as to what is happening. (The RecordSource for the report is clearly defined.)
Any ideas?
Thanks,
Bill