Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox?

Status
Not open for further replies.

75cl

Programmer
Nov 1, 2001
43
US
Is there a property in a combo box that keep it from adding the duplicate data?
 
Hi 75cl

Not that I know of but something like this might help

Private Sub cmdC1_Click()
intFlag = 0
strS = Combo1.Text
For intA = 0 To Combo1.ListCount - 1
If StrComp(Combo1.List(intA), str) = 0 Then
intFlag = 1
End If
Next
If intFlag <> 1 Then
Combo1.AddItem strS
End If
End Sub

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top