Run Query based on Selection in Combobox

  • Thread starter Thread starter erica hale
  • Start date Start date
E

erica hale

I need to run a query based on a what a user selects in a
combo box in a form. For example, if a user selects
policy no. #1234 from the drop down, then I would like a
command button on the form to run a query with that
parameter. How can I accomplish this? Thanks for any
help.
 
The easiest way is to put into the criteria in the qeury for PolicyNo

=Forms!NameOfForm!NameOfBox

That way when the query runs it will use the value in the form. Of course
this won't work if you close the form before the query runs.

Kelvin Lu
 
Kelvin,

Sounds perfect! Thanks so much.
-----Original Message-----
The easiest way is to put into the criteria in the qeury for PolicyNo

=Forms!NameOfForm!NameOfBox

That way when the query runs it will use the value in the form. Of course
this won't work if you close the form before the query runs.

Kelvin Lu




.
 
Back
Top