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

How to make certain option buttons run certain queries. 2

Status
Not open for further replies.

KaayJaay

IS-IT--Management
Jul 6, 2004
64
0
0
US
Now lets say i have 4 queries, i want the option buttons in the group to basically pick which query is to be ran, then i have two date range text boxes. The plan is to make it so that depending on which query is ran and the date range entered, a reulst is returned, but im not sure how to make certain option buttons run a certain query. Any suggestions?

KaayJaay
 
Hi

Have a button on the form to run the query, in the onclick event of that button

Select case opgMyOptionGroup
Case 1
MyQueryName = "Option1Query"
Case 2
... you get the idea ?
End Select
DoCmd.OpenQuery MyQueryCommand

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks Ken

As usual (Tek-Tips and yourself) what I need, when I need it. Star coming.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top