Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing filter in query to a report

Status
Not open for further replies.

fedum

Technical User
Mar 22, 2004
104
BE
Hi,
I have a query in witch I make a filter using vba

DoCmd.OpenQuery "qryProductenLeveranciers", , acEdit
Me.Filter = strFilterQ
Me.FilterOn = True
DoCmd.Close acQuery, "qryProductenLeveranciers", acSaveYes

Then I would like to print a report using this query with the filter.
Do I have to build the filter again when opening the report or can I pass the filter.
I thought that the filter was saved in the query by the acSaveYes but when I print then I get all the records.
I use a macro to print.

Thanks
 
Sorry jedraw, I would like to use a VBA code
 
Why not simply use the 4th argument of the DoCmd.OpenReport method ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top