Cascading Combo Box

R

Rodney Doucett

In my database form I have two combo boxes, one will select warehouse number
(for which there are 7). The other combo box I need to update and give me
locations that are in a table representing the warehouse number selected.
Since I am new to this I was told the best way to accomplish this was to make
cascading combo boxes. However I have no idea on how to set this up.

Can someone offer me some direction on how to do this?

Thanks

R
 
M

Maurice

Rodney,

Create a query for the second combo. Within this query you set a criterium
to the keyfield used by the first combobox. When used in a form you have to
make sure that the second combo is requeried to see the actual refreshment.

Example

combo 1 has it's own rowsource with an unique key field
combo 2 needs a query as a rowsource where the field from the first combo is
added to the querygrid
the criteria of the unique keyvalue of the first combo is referencing the
combobox on the form. Could look something like: forms!frmYourForm!combobox1

In the afterupdate of combobox one you place: me.combobox2.requery

This should do the trick.
Also if you do a search for cascading comboboxes you'll find many samples in
the NG.

hth
 

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