Getting rid of duplicates in ComboBOX

Discussion in 'Web Design & Coding' started by Sanchez, Jul 6, 2004.

  1. Sanchez

    Sanchez OSNN Junior Addict

    Messages:
    14
    Alright, in my Database I have many samples that are frozen on different dates.

    What I'm trying to do is create a combo box with all the dates included. And when a date is selected, display all the samples that were frozen on that date in a listbox.

    However, I've run into a problem already in that when I choose to make the combo box from the date column of my table, it takes all the dates, even the duplicates. For example, if there are 3 samples frozen on june 20th. there will be 3 june 20th's in the combo box. How can I get rid of this. I tried the removeitem property but it's not working. It says I'm not able to use this property when the combo box is connected to a data table or something when I go to help. ANY SUGGESTIONS?

    Thanks.
     
  2. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    if your usingf SQL to get the data from the database you can use SELECT DISTINCT to get rid of duplicates
     
  3. Mainframeguy

    Mainframeguy Debiant by way of Ubuntu Folding Team

    Messages:
    3,763
    Location:
    London, UK
    we need to know the database - I am guessing from your description that you cannot use native SQL - but there may be some sort of option to employ it behind the scenes, if we know how your data is stored/accessed