multiple criteria

R

Rick Churchill

I have a form that I want to open using 2 distict
criteria. I can use a combo box to select the first
criteria then link the form to a querry that asks for the
second criteria before opening the form. While this
works, I would prefer to use a combo box for both sets of
criteria. This way I can have a drop down list for both
sets instead of having to rely on memory for the second
set of criteria. I can write the code that will open the
form using one set of criteria or the other but can not
get it to work for both. Any help on how to do this would
be greatly appreciated.
 
T

tina

create the two combo boxes on the first form. then write a
query that you will use as the record source of the second
form. set the query's criteria to reference both of the
combo boxes: in query design view (the QBE grid) the
reference will be [Forms]![FormName]![ComboName], for each
of the two fields you're filtering on.

hth
 
R

Rick

Thanks a lot. That did the trick.

-----Original Message-----
create the two combo boxes on the first form. then write a
query that you will use as the record source of the second
form. set the query's criteria to reference both of the
combo boxes: in query design view (the QBE grid) the
reference will be [Forms]![FormName]![ComboName], for each
of the two fields you're filtering on.

hth

-----Original Message-----
I have a form that I want to open using 2 distict
criteria. I can use a combo box to select the first
criteria then link the form to a querry that asks for the
second criteria before opening the form. While this
works, I would prefer to use a combo box for both sets of
criteria. This way I can have a drop down list for both
sets instead of having to rely on memory for the second
set of criteria. I can write the code that will open the
form using one set of criteria or the other but can not
get it to work for both. Any help on how to do this would
be greatly appreciated.
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top