Option Group

huskies

Registered User.
Local time
Yesterday, 19:43
Joined
Dec 2, 2008
Messages
25
Is there a way to filter specific data by my option group? So here is what I am doing.. I have ages of people I want split out by..

<18
18-50
50+

.. I have created my option group with those 3 values.. How can I tie this to the query I am running to filter it when I select one of those values?

I am also trying to do this for another option group which consists of..

Male
Female
Both

Thanks in advance for your help!
 
option groups are grouped as one value by default (I think). so....in a query, you need to reference the option group control name. for instance:
PHP:
WHERE field = forms!formname!optiongroupname
if I remember right, option group elements have values assigned to them, like 1, 2, 3, etc...

so you will need to include that value in the WHERE clause of the query. i think you can change the option value property too. so, you could change it to coincide with the value that you are showing next to each radio button.
 
I thought that the option group can pull in the results from a query.. So for instance if I select <18 only those individuals pull into the query.. There has to be an if statement or something for that to happen? Correct? Same deal with the Male/Female/Both for the Gender option box.
 
I thought that the option group can pull in the results from a query.. So for instance if I select <18 only those individuals pull into the query.. There has to be an if statement or something for that to happen? Correct? Same deal with the Male/Female/Both for the Gender option box.
i don't know how else to explain it other than what I already said. try using the WHERE clause example I posted before.
 
OK so I have it linking to the query.. However it is pulling on the 1,2, or 3 values for age. I need it to pull the range of 1-18, 18-50, etc.. Is there a way to set that up in the option value field in my option group or not?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom