Parameter query based on form control?

Kokomoman

New member
Local time
Today, 00:44
Joined
May 10, 2003
Messages
6
I'm sure a similar question has been answered before but I'm having trouble finding a solution. I have a form that I wanted a button to open a query. I have an option group on the form for the user to select the region to work with. In the saved query that I'd written I have a field for region. Is there a way to open the query from the form with the a region criteria based on what the user selected on the option group on the form? I hope I explained this ok. Doesn't sound like a hard problem, but I'm having trouble figuring it out. Thanks a bunch.
 
Hi Kokomoman,

this would work if you'd use a c o m b o b o x instead of the option group:


1. Create a button on the form, which opens the query (the assistant should help a lot)

2. Include a criteria in your region field of the query; use the buildup wizard (magicians stick in toolbar) -> Forms -> your form-> your combobox (the criteria should look like

=[Forms]![yourForm]![yourKombobox]



If you need the option group, I suppose you have to check every single option and determine the criteria of the query (I dont exactly know how, suppose via nested if's).

Another simple sollution: you could create a button opening the respective query for every region (if there are not too many regions; 25 regions would mean 25 buttons & 25 queries; another disadvantage: updateing this is messy).


HTH,
Barbarossa II

PS: Kokomoman, are you from Kokomo, Ind., USA ?
 

Users who are viewing this thread

Back
Top Bottom