Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

select Query for report with two option groups

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Wood - 21 Nov 2006 09:33 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.