Hi,
If you could please have a look at the code below here is the problem I am having.
If I select Accommodation the combo box is populated fine, however if I go ahead and select Restaurants from the original combo box the accommodation values are still there.
How can i make it so that if the user changes their selection in cboSelCat, previous entries in the combo box cboSelSubCat will be removed?
Thanks
Private Sub cboSelCat_Click()
Select Case cboSelCat.Text
Case "Accommodation"
cboSelSubCat.AddItem "Hotels"
cboSelSubCat.AddItem "Guesthouses"
cboSelSubCat.AddItem "Hostels"
Case "Restaurants"
cboSelSubCat.AddItem "Chinese"
cboSelSubCat.AddItem "Italian"
cboSelSubCat.AddItem "Mexican"
cboSelSubCat.AddItem "Other"
Case Else
cboSelSubCat.AddItem "Empty"
End Select
End Sub
If you could please have a look at the code below here is the problem I am having.
If I select Accommodation the combo box is populated fine, however if I go ahead and select Restaurants from the original combo box the accommodation values are still there.
How can i make it so that if the user changes their selection in cboSelCat, previous entries in the combo box cboSelSubCat will be removed?
Thanks
Private Sub cboSelCat_Click()
Select Case cboSelCat.Text
Case "Accommodation"
cboSelSubCat.AddItem "Hotels"
cboSelSubCat.AddItem "Guesthouses"
cboSelSubCat.AddItem "Hostels"
Case "Restaurants"
cboSelSubCat.AddItem "Chinese"
cboSelSubCat.AddItem "Italian"
cboSelSubCat.AddItem "Mexican"
cboSelSubCat.AddItem "Other"
Case Else
cboSelSubCat.AddItem "Empty"
End Select
End Sub