From your first message...I assumed you want to search the database for UNIQUE list of Americas, yes?My first combo box is for region which needs to be populated from a sql table called Region_Mapping
To get unique items from a Table, Use DISTINCT. This will get you the list without duplicates.
Then, you use the value of the combobox to fill the listbox.and my first list box should be linked to the same sql table but it should populate the countries on the basis of the region which user will select in the combo box.
So, Double click your combobox, then select the Exit event (upper right)
Inside this sub write another query to fill the listbox just like your example for the combobox.Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) End Sub




Reply With Quote