Using filter in report

izen

Registered User.
Local time
Today, 19:57
Joined
Apr 2, 2009
Messages
50
Hi guys !!

I would like to use filter property to filter the report
but i dont want to fill in the propertity window, I would like it more dynamic. So I would like to add the code filter in the report form


Private Sub cmdReport_Click()

reportsample.Filter = [ProductCategoryID] = 2 and [ProductSupplierID] = 3
reportsample.Filteron = true

DoCmd.OpenReport "reportsample", acViewPreview
reportsample.filter=""
End sub

PS I dont want to use WhereCondition: because I want to do something else after I filter the report

Pls help

CHeers
 
Reports![samplereport].Filter = ""

why I got the error that the reportname 'samplereport' I entered misspelled or refers to a report that isnt open or doesnt exit?

it is spelled correctly and the report exists why i got that warning ?

==========================================================
ok I know what happened

I need to open the report that i want to filter before

cheers,
 
Last edited:

Users who are viewing this thread

Back
Top Bottom