Restricting one Combo box based on the selection in another field

G

Guest

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
 
G

Guest

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
 

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

Top