Another stupid question on combobox

PlayKid

Freshman
Joined
Jun 25, 2005
Messages
38
Dear all,

I am trying to filter data by using dataview and display the results on the combo box, but the problem is it displays more than 1 exactly the same results on a combo box, how can I do it to prevent this happned?

Thanks

PlayKid
 
If I'm not mistaking your question, I think you're wanting this:
Visual Basic:
If Not ComboBox1.Items.Contains(someValue) Then
    ComboBox1.Items.Add(someValue)
End If
 
No, this is not what I mean, I am populating the combobox by dataview, and it automatically populate the data onto it, since I am not adding it manually, so your code is not what I want.
But thanks for your replying.
PlayKid
 
Maybe you can resolve your problem in the query?? maybe add the DISTINCT after the select

SELECT DISTINCT *
FROM TABLE
WHERE conditions

hope this helps
 
Back
Top