Controlling Combo Box

  • Thread starter Thread starter Pablo
  • Start date Start date
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?
 
Pablo,

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

Hope this helps!

Kevin
 
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
 
Back
Top