Question Getting specific items from a table to show in combobox

Mike Delke

New member
Joined
Mar 8, 2016
Messages
1
Location
Michigan
Programming Experience
Beginner
Hello,

I am making a project to log contacts with other ham radio operators, as part of the form I have a combo box that shows the States, then depending on which state is in the box I want to populate a combo box with a list of counties to pick from. The state combo box functions as expected showing all 50 states. The county combo box shows all the counties I have entered so far, when I am finished there will be 3079 counties in the list. I would like to have only the counties from the state in state combo box show in the county combo box. Both tables are in the same database.

I am using Visual Studio 2015 Community edition.


this is what the table data looks ...

1
1
First (SE)
2
1
Second (NW)
3
1
Third (SC)
4
1
Fourth (C)
5
2
Autaugo
6
2
Baldwin
7
2
Barbour

what you are seeing is first number is county id ( primary key), second number is primary key for state, then county name. As you
see there are two different states by state Id, if I have Alaska in state combo box ( state id 1 ) the whole list shows, and the same
if Alabama in state combo box ( state id 2 ).




Any help would be appreciated.
 
Back
Top