wnazzaro
09-27-2005, 04:06 PM
A form walks into a bar...
So I have this form, and when the country is updated in the first combo box, the two other combo boxes list only the sites and site numbers in that country. That part works okay. The problem is, I can't seem to remove the items if the Country combo box is changed, everything just keeps piling up. The problem below is that the index for RemoveItem is not a simple counter like ListCount. All help is greatly appreciated.
Private Sub CmBoxCountry_AfterUpdate()
Dim Counter As Integer
For Counter = 0 To CmBoxPIName.ListCount - 1
CmBoxPIName.RemoveItem (Counter)
CmBoxSiteNo.RemoveItem (Counter)
Next
FilterX
End Sub
Bill
So I have this form, and when the country is updated in the first combo box, the two other combo boxes list only the sites and site numbers in that country. That part works okay. The problem is, I can't seem to remove the items if the Country combo box is changed, everything just keeps piling up. The problem below is that the index for RemoveItem is not a simple counter like ListCount. All help is greatly appreciated.
Private Sub CmBoxCountry_AfterUpdate()
Dim Counter As Integer
For Counter = 0 To CmBoxPIName.ListCount - 1
CmBoxPIName.RemoveItem (Counter)
CmBoxSiteNo.RemoveItem (Counter)
Next
FilterX
End Sub
Bill