query to filter from textbox entry

  • Thread starter Thread starter p-rat
  • Start date Start date
P

p-rat

I have a query that I would like to filter based on an entry into a
textbox on form. The query is used in a combo box on the same form.

Example would be textbox1 = location. combobox2 = locationequipment

When someone enters Dallas into textbox1 I would like this to
automatically filter the recordset of query to only the equipment in
this location.

Would someone know how to do this?
 
I have a query that I would like to filter based on an entry into a
textbox on form. The query is used in a combo box on the same form.

Example would be textbox1 = location. combobox2 = locationequipment

When someone enters Dallas into textbox1 I would like this to
automatically filter the recordset of query to only the equipment in
this location.

Would someone know how to do this?

I'd use a combo box in place of Textbox1 just to avoid the risk of a user
typing in "Dalles" or "Dalllas".

Base the second combo on a Query referencing

=Forms!yourformname!firstcontrolname

as a criterion to limit the equipment to equipment at that location, and
Requery the combo box in the afterupdate event of the first.
 
Back
Top