PlayKid Posted August 24, 2005 Posted August 24, 2005 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 Quote
*Experts* DiverDan Posted August 25, 2005 *Experts* Posted August 25, 2005 If I'm not mistaking your question, I think you're wanting this: If Not ComboBox1.Items.Contains(someValue) Then ComboBox1.Items.Add(someValue) End If Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
PlayKid Posted August 25, 2005 Author Posted August 25, 2005 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 Quote
rfazendeiro Posted August 25, 2005 Posted August 25, 2005 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.