D
David M C
Im trying to use this code in the Open event of a Report:
Private Sub Report_Open(Cancel As Integer)
If ([Forms]![frmJobSetup2]![SelectJob].Column(2) <> "") Then
Me.Filter = [Forms]![frmJobSetup2]![SelectJob].Column(2).Text
Me.FilterOn = True
MsgBox Me.Filter
Else
End If
End Sub
to dynamically filter reports based on a selection from a combobox. If I do
it using the filter property of DoCmd.OpenReport it works, but filtering in
the open event doesn't work (ie, the report opens, but it doesn't filter,
neither does it display my MsgBox). I don't want to filter using the
OpenReport function because the report needs to be dynamically filtered at
runtime in order to use Lebans reportToPDF utility, and OutputTo (nor Lebans
utility) doesn't have a filter parameter. If I can't filter dynamically
filter, I'm going to have to create several reports with different query's to
be able to both print, preview, and output to pdf.
Any ideas?
Thanks
Dave
Private Sub Report_Open(Cancel As Integer)
If ([Forms]![frmJobSetup2]![SelectJob].Column(2) <> "") Then
Me.Filter = [Forms]![frmJobSetup2]![SelectJob].Column(2).Text
Me.FilterOn = True
MsgBox Me.Filter
Else
End If
End Sub
to dynamically filter reports based on a selection from a combobox. If I do
it using the filter property of DoCmd.OpenReport it works, but filtering in
the open event doesn't work (ie, the report opens, but it doesn't filter,
neither does it display my MsgBox). I don't want to filter using the
OpenReport function because the report needs to be dynamically filtered at
runtime in order to use Lebans reportToPDF utility, and OutputTo (nor Lebans
utility) doesn't have a filter parameter. If I can't filter dynamically
filter, I'm going to have to create several reports with different query's to
be able to both print, preview, and output to pdf.
Any ideas?
Thanks
Dave