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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ApplyFilter???Please help

Status
Not open for further replies.

notsohappy

Technical User
Joined
Apr 8, 2002
Messages
2
Location
CA
Hello, [sadeyes]
I need some help if anyone can - regarding the applyfilter macro. what I have is a query that the user will need to filter differently everytime, then print a report of ONLY filtered data. I have this working where they can filter by selection right down to the exact records they need. I then open the report that uses this query as its control source (i have put the Applyfilter macro in the On Open property) as long as i go into design view and reselect the query as the control source - it will work, showing me only the reeports for the filtered data! but HOW HOW HOW do i automate this so the user just opens the report in preview view & the filtered records are there?
If anyone could help - I'd owe you big time!
Thanks
C
 
You can call the OpenReport method with a FILTER NAME criteria:

DoCmd.OpenReport reportname[, view][, filtername][, wherecondition]

Check out the help on the OpenReport METHOD.
78.5% of all statistics are made up on the spot.
Another free Access forum:
More Access stuff at
 
Thanks Wildhare,
I did look at the help on that - sorry i'm still quite new at this - where do i put that OpenReport method? what do i attach it to?
the other problem is that my where condition is never the same, can i leave that out & have it only recognise the filtered data that the user has chosen??
I appreciate your help - and i love your site by the way :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top