Hi I’m Using Visual Studio 2010, and what I want to know is how can I relate two Comboboxes. I’ve 2 ComboBoxes: the first is populated with a list of items from the database and I want to create a second ComboBox With a different type of list based on the choice of the first ComboBox.
Example: First Combobox with all the continents and the second ComboBox with all the nations. I want that the nations list of the second ComboBox changes according to the selected continent in the first ComboBox.
In SQL I’ve two tables: Continents and Nations.
Use the selectedvaluechanged property of the combobox to load launch a sub that fires the query for the second combobox.
You see a use a ‘me.initiallyloaded’ property in the code below, the combobox has the disadvantage that it also fires when the form is first loaded. Using this boolean prevents that.