Me.Filter property syntax for reports

dwhite

Registered User.
Local time
Today, 22:02
Joined
Dec 26, 2000
Messages
13
I have been trying to filter a report by setting the value using the following code in the "Open" event on a report(based on a crosstab)

Private Sub Report_Open(Cancel As Integer)
'Dim RegionString As String

'RegionString=InputBox("Please enter region code")
Me.Filter = "RegionCode='wf' "
Me.FilterOn=True

End Sub

This works as is(ignoring the commented out lines)but I am trying to place a variable in the place of the 'wf', but having trouble with the syntax. Is there a way to place a variable here? Thanks for any help.

D White
 
Instead of using code inside the report, you can use a where argument when the report is opened. Look up the OpenReport Method to see how.
 

Users who are viewing this thread

Back
Top Bottom