Query based on two option group selections

J

jonfromdon

I have a database which holds all our customers service data and am trying to
produce a form which allows an operator to select the [calibrationmonth] and
[engineer] via option groups (checkboxes), then on clicking a command button
will have all the records for that chosen month and that chosen engineer
presented ready for printoff. Can anybody help please - all my efforts have
resulted on blank browses so far!
 
S

strive4peace

Hi Jon,

use option buttons in your frames instead of checkboxes so you can set
the Option Value properties

for the Month option buttons:

make sure they are in a frame (of course <smile>) and make sure that
each Option Value (Data tab of Properties) corresponds to the month number

rather than option buttons for the engineer, how about using a listbox
then you won't have to convert the option button values data to strings
in your code...unless you have EngineerIDs -- then those can be your
Option Values

You can find some detailed instructions for building a WhereCondition
for the OpenReport action in this thread:

http://www.microsoft.com/office/com...ffice-access&lang=en&cr=US&sloc=en-us&m=1&p=1

newsgroup: microsoft.public.access
subject: Re: Query Report Not showing any print preview outputs
date: Apr 5, 2008 5:47 AM EST
initial post: Apr 3, 2008 10:52 pm EST


Warm Regards,
Crystal

*
:) have an awesome day :)
*
 
N

NetworkTrade

hmmm well...it seems like you are almost there....not sure where your problem
lies...

OptionGroup1 is a service month ; so the optiongroup should be returning
values 1-12 depending on which is selected....

OptionGroup2 is engineers....that is returning a value 1-? depending on how
many names....

So a typical record will have two values say: 3 and 4 for March and Tom
Smith

Somewhere you need 3 = March and 4 = Tom Smith.... because your query is
on 3 and 4 not on March or Tom Smith directly....
 
J

jonfromdon

Hi crystal

Thanks for the info - with a bit of tweaking on my report layout I have what
I was seeking.
Thanks again
--
john


strive4peace said:
Hi Jon,

use option buttons in your frames instead of checkboxes so you can set
the Option Value properties

for the Month option buttons:

make sure they are in a frame (of course <smile>) and make sure that
each Option Value (Data tab of Properties) corresponds to the month number

rather than option buttons for the engineer, how about using a listbox
then you won't have to convert the option button values data to strings
in your code...unless you have EngineerIDs -- then those can be your
Option Values

You can find some detailed instructions for building a WhereCondition
for the OpenReport action in this thread:

http://www.microsoft.com/office/com...ffice-access&lang=en&cr=US&sloc=en-us&m=1&p=1

newsgroup: microsoft.public.access
subject: Re: Query Report Not showing any print preview outputs
date: Apr 5, 2008 5:47 AM EST
initial post: Apr 3, 2008 10:52 pm EST


Warm Regards,
Crystal

*
:) have an awesome day :)
*

I have a database which holds all our customers service data and am trying to
produce a form which allows an operator to select the [calibrationmonth] and
[engineer] via option groups (checkboxes), then on clicking a command button
will have all the records for that chosen month and that chosen engineer
presented ready for printoff. Can anybody help please - all my efforts have
resulted on blank browses so far!
 
S

strive4peace

you're welcome, John ;) happy to help

Warm Regards,
Crystal

*
:) have an awesome day :)
*
 
Top