Launching A Query With Option Group & Button?

Napole0n

Registered User.
Local time
Today, 15:13
Joined
Nov 5, 2015
Messages
12
Hi all, quite new to Access and I've set up an option group and want to know how to launch a query dependent on the option group that is selected when a button is pressed. There are 6 queries, anyone of which could be ran dependent on the users choice.

A snapshot of this is below:

OfMHP4.png


What code would I need to put behind the button to launch which ever query was selected (i'm presuming some sort of IF statements), and of course only one option can be selected at a time.

Thanks in advance.
 
something like

select case myoptiongrpctrl
case 1
docmd.openquery("qryforbooktitles")
case 2
docmd.openquery("qryforauthor")
case 3....
end select
 

Users who are viewing this thread

Back
Top Bottom