Controlling Combo Box

P

Pablo

I am new to Access and would like to figure out how to
control the values a combo box offers from a higher level
combo box.

example: Grocery Store metaphor

combo box A:
Deli, Meat, Frozen Foods, Beverages

combo box B:
Turkey (Deli), Cheddar (Deli), Swiss (Deli), Ham (Deli)
Chicken (Meat), Pork (Meat), Beef (Meat), Fish (Meat)
TV Dinners (FF), Ice Cream (FF), Vegetables (FF)
Milk (Bev), Coke (Bev), Beer (Bev), Wine (Bev)

I would like for combo box A to control what the user can
select from combo box B.

Any ideas or reference materials?
 
K

Kevin

Pablo,

Base the Rowsource of combobox B on a query that uses data
in combobox A as selection criteria.

Hope this helps!

Kevin
 
K

Kelvin Lu

You will need to change the row source for combo box B after combo box A is
chosen. Create a query to generate the list for combo box B. Set the
criteria (field indicating Deli, Meat, etc) to equal
Forms!nameOfForm!cmbBoxA. Set the row source for combo box B to the query
then in the afterupdate event of combo box A add the following code:

Me.cmbBoxB.Requery

This should update the list in combo box B.

Kelvin Lu
 

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

Similar Threads


Top