If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Combo box values based on preceding choice

Hi, I'm trying to set up a couple of Combo Boxes on a form in Access 2007 as follows:

The first Combo Box has a defined list of values, so the user has to select one of these from the dropdown. e.g Customer, Supplier, Contractor.

What I want is for the second Combo Box to fill with all the possible values of the "Name" field for the appropriate table, based on the selection made in the first box.

So if the user selects Customer, then in the second Combo Box the available values that can be selected are each of the "Name" values from the Customers table.

(I was thinking of just having it check to see if a typed Name exists, but then figured that having each available name as an option was far better- we want to force users to pick a name that already exists in the relevant table)

I tried playing with the AfterUpdate event of the first Combo Box but all this does is create an Event Procedure which then waits for me to insert some appropriate code. But I can't figure what code should actually be added in there- and if any should be added into the second box as well. Any ideas?