Hi
Is it possible to select the query for a report based on the results of two
option groups on a form?
eg the report requires the same set of information, but the query it uses
will depend on option group "A" select cityA, CityB, CityC, and option group
"B" ParkA, ParkB, ParkC. Therefore if option group "A" = CityA, and Option
group "B" = ParkB then use query "X" etc etc.
Thank you in advance
Keith Wilby - 21 Nov 2006 10:55 GMT
> Hi
> Is it possible to select the query for a report based on the results of
[quoted text clipped - 6 lines]
> group "B" = ParkB then use query "X" etc etc.
> Thank you in advance
Yes, build a query string based on the option group settings, then pass the
string to the report using OpenArgs in the DoCmd.OpenReport line of code.
In the report's open event, set the record source to Me.OpenArgs.
HTH - Keith.
www.keithwilby.com