Hi there,
I am trying to clear a combobox that I have loaded at the beginning of my form. My combo box consists of various items from a table. I am able to load my info into the combo box, no problem.
When the user clicks on a button, I am trying to clear the combo box, but for some reason I cannot clear the damn box!
If I am doing this wrong, please let me know or if you have any advice, any would be appriciated.
'code that starts in the form load event
If IsNull(txtC1) = True Then
Else
cmbContactNames.AddItem txtC1
End If
If IsNull(txtC2) = True Then
Else
cmbContactNames.AddItem txtC2
End If
If IsNull(txtC3) = True Then
Else
cmbContactNames.AddItem txtC3
End If
'Now on my click button event I thought I could do this
cmbContactNames.Clear
Any ideas?
Thanks
I am trying to clear a combobox that I have loaded at the beginning of my form. My combo box consists of various items from a table. I am able to load my info into the combo box, no problem.
When the user clicks on a button, I am trying to clear the combo box, but for some reason I cannot clear the damn box!
If I am doing this wrong, please let me know or if you have any advice, any would be appriciated.
'code that starts in the form load event
If IsNull(txtC1) = True Then
Else
cmbContactNames.AddItem txtC1
End If
If IsNull(txtC2) = True Then
Else
cmbContactNames.AddItem txtC2
End If
If IsNull(txtC3) = True Then
Else
cmbContactNames.AddItem txtC3
End If
'Now on my click button event I thought I could do this
cmbContactNames.Clear
Any ideas?
Thanks