multiple criteria

  • Thread starter Thread starter Rick Churchill
  • Start date Start date
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.
 
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
 
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.
.
.
 
Back
Top