Can I refresh a combo box list?

L

Laurel

I have 3 combo boxes, and the row source for the 3rd is dependent on the
values of the first two. The row source for the second is dependent on the
value in the first. How can I get the 2nd combo box to refresh when the
value in the first changes? And, similarly, how can I get the values in the
3rd list to refresh when the data in either the 1st or 2nd changes?
 
J

Jeff Boyce

Laurel

For specifics, look up "Cascading Combo boxes" via Google.com or at mvps.org
....

The general idea is that you would use the AfterUpdate event in ComboBox1 to
requery CB2 and CB3, and the AfterUpdate event of CB2 to requery CB3.

You'd need to have CB2's source depend on the selection in CB1, and the
CB3's source depend on the selection in CB2.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
L

Laurel

Thanks!
Jeff Boyce said:
Laurel

For specifics, look up "Cascading Combo boxes" via Google.com or at
mvps.org ...

The general idea is that you would use the AfterUpdate event in ComboBox1
to requery CB2 and CB3, and the AfterUpdate event of CB2 to requery CB3.

You'd need to have CB2's source depend on the selection in CB1, and the
CB3's source depend on the selection in CB2.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Be careful that you are not introducing redundancy into a table with this,
e.g. correlated combo boxes for Country, State and City all bound to columns
in the underlying table would mean redundancy as City determines State, and
State determines Country. Only City should be in the table as this
references a States (or more likely a generic regional description to allow
for international differences) table and this in turn a Countries table.

I've posted a demo of ways of handing data like this at:


http://community.netscape.com/n/pfx...yMessages&tsn=1&tid=23626&webtag=ws-msdevapps


Ken Sheridan
Stafford, England
 

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