country to state dependency drop down box?..

ticc888

Board Regular
Joined
Sep 10, 2003
Messages
156
HI,

I'm new to VB and struggling to find code that will assist o build or start me off building the traditional dropdown box dependent on another ....

justlike selecting the country, which based on the countrywill filter the next drop down to the states relevant to that country?

Can anyone assist?

Thanks in advance, great forum, great vibes..

Frank

ticc888@yahoo.com
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Why use VB ?

Two drop down boxes on your form, the first one selects everything from a table in your DB - lets say contries

The second box links to a second table in your DB - lets say States. You would need to set the row source to select * from States where CountryName = listbox1.value

I've not tried this before but I see no reason why it wont work, it's a good starter for 10 anyway!

HTH

ChrisUK
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,351
Members
451,697
Latest member
pedroDH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top