Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run queries through forms?

User Interface Techniques

How to run queries through forms?

by  Kckronic21  Posted    (Edited  )
What you want to do is to create a form that list all of the positions in a combobox and run a query from the selection of that combobox.

1) Create a table called ôPositionö with ôPositionö as a field name
The data in your table such look like this:

ôPositionö
Manager
Supervisor
Associate

2) Create a table called ôEmployeesö with ôNameö, ôPositionö, and ôShiftö as field names. The data in your table such look like this:

Name Position Shift
Kim Supervisor 3rd
Mike Manager 2nd
Chris Associate 2nd

3) Save the table and create a query called ôEmployee_Queryö with the following fields:

Name Position Shift

4) Place the following criteria under the ôPositionö field:
=[Forms]![Employee_Form]![Position_combobox]

5) Save the query and create a form called ôEmployee_Formö with the control source of that form being ôEmployee_Queryö.

6) Create a combobox using the wizard that will lookup the values in the ôPositionö table.

7) Name this combobox ôPosition_comboboxö.

8) Create a button using the wizard that will run the ôEmployee_Queryö

9) Save the Form

10) Go to design view, choose a position, and press the button.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top