Rusty Hammond
rustykh at yahoo.com
Mon Oct 15 12:46:44 CDT 2007
I've not tried it, but can you take the current filter applied to the form, and use that as your WHERE clause when opening the report. For example if calling the report from the same form do the following: DoCmd.OpenReport "YourReportNameHere", acViewPreview, , Me.Filter HTH, Rusty ----- Original Message ---- From: Susan Harkins <ssharkins at gmail.com> To: Discussion of Hardware and Software issues <dba-tech at databaseadvisors.com> Sent: Monday, October 15, 2007 12:01:09 PM Subject: Re: [dba-Tech] Combining a query with a report Arthur, you can, but I'll have to look it up -- if I forget, nudge me later. It'll take me a while to find it because it's old. Susan H. > This one is puzzling me more than a little. The user wants to be able to > impose a filter on a form. I explained to her how to use "Filter by Form" > and she's pretty sharp so she picked up on it very quickly. But now the > question is, how to pipe the current filter into a report. I had hoped > that > Access would take the values in "Filter By Form" and write them into the > "Filter" property of the form, but apparently this is not the case. The > information is undoubtedly somewhere, even if only in Access's memory. The > question is, how to obtain it. Once I figure that out, then I can capture > it > and pass the string as the WhereCondition to the report. The columns on > said > report won't change, but the Filter conditions may vary widely. Now that > said user understands "Filter By Form", we're most of the way there, but > she > wants totals on various columns, so the report can handle part if I can > figure out how to feed the current filter into it. > > Anyone got any ideas on this? > > TIA, > Arthur > _______________________________________________ > dba-Tech mailing list > dba-Tech at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-tech > Website: http://www.databaseadvisors.com _______________________________________________ dba-Tech mailing list dba-Tech at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-tech Website: http://www.databaseadvisors.com ____________________________________________________________________________________ Check out the hottest 2008 models today at Yahoo! Autos. http://autos.yahoo.com/new_cars.html