Restricting one Combo box based on the selection in another field

D

Doug

Hi there,

I am looking to restrict one combo box based on a value selected into a
field from another combo box within access forms.

E.g.
Area on boat: Galley (First field combo box selects Galley)
Items in Area: ??? (Restrict the combo box in this field
based on Galley)

I seem to be able to get it to work for the first selection, but if I change
the Area on boat to another value (e.g. Saloon), the second combo box does
not change to restrict the items in area to be the new values (I.e. saloon
items).

Thanks in advance
 
T

Tom Wickerath

S

storrboy

Hi there,

I am looking to restrict one combo box based on a value selected into a
field from another combo box within access forms.

E.g.
Area on boat: Galley (First field combo box selects Galley)
Items in Area: ??? (Restrict the combo box in this field
based on Galley)

I seem to be able to get it to work for the first selection, but if I change
the Area on boat to another value (e.g. Saloon), the second combo box does
not change to restrict the items in area to be the new values (I.e. saloon
items).

Thanks in advance

You need to tell the combobox to run it's rowsource query again.
In the AfterUpdate event of the first combo, add the following
line.Replace with actual combo names.

Me!ComboBoxName.Requery
 
Top