Getting rid of duplicate items in combo box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tehgreatmg
    New Member
    • Jan 2007
    • 49

    Getting rid of duplicate items in combo box

    I have a from with combo boxes that have the record source set to fields in my database. The database is for computer inventory so some things like manufacturer and model repeat. I was wondering how to be able to still have the combo box set to that record source but have no duplicates in the combo box.
    In other words Instead of my model combo box listing:
    optiplex
    latitude
    optiplex
    optiplex
    inspiron
    xps
    xps

    I want it to be like:
    inspiron
    latitude
    optiplex
    xps


    Thanks in advanced everyone!!
  • MSeda
    Recognized Expert New Member
    • Sep 2006
    • 159

    #2
    just add the word distinct after "SELECT" in your rowsource. SELECT DISTINCT will return each value just once.

    Comment

    • cyberdwarf
      Recognized Expert New Member
      • Nov 2006
      • 218

      #3
      Mseda is right, just be careful that your control is binding to the correct column in the combo

      HTH

      Steve

      Comment

      • tehgreatmg
        New Member
        • Jan 2007
        • 49

        #4
        Ahh thanks soo much this saved me from ripping the rest of my hair out.

        Comment

        • cyberdwarf
          Recognized Expert New Member
          • Nov 2006
          • 218

          #5
          You still got hair!

          Clearly not been working in IT too long!

          Comment

          Working...