query to filter from textbox entry

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?
 
J

John W. Vinson

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.
 

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