Combo box list based on information entered in another combo box

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

I have a combo box with customer names and a 2nd with jobs done for all
customers.
The jobs table consist of the customer name and job name

I want to user to select the customer in the 1st combo box. When they
select the 2nd combo box I just want jobs to appear that are related to that
customer.
 
Wayne,

Create a query for the second combobox. Set the customerfield criteria in
the query to the combobox on the form. Could look somthing like this:

Forms!formname!combobox

This assumes that the first column in your first query is the customer

When you have done this you still have to place a requery behind the
after_update event of the first combobox which could be something like:

me.combobox2.requery

this will accomplisvh what you are looking for.
Remember to replace the formname with the actual formname of the form and
the combobox names for the actual combobox names.

hth
 
Hi, Wayne.

I have an example of exactly what you are wanting to do on my website.

Go to: http://www.askdoctoraccess.com/DownloadPage.htm

Scroll to the bottom of the page and download the
"DemoCascadeComboBoxes.zip" file. It contains one Access file named
"DemoCascadeComboBoxes.mdb". Extract this file and try it. There is one
table and some code in the AfterUpdate event of the "cboCustomers" combo box.
 
Back
Top