Duplicate dropdown list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sophannaly
    New Member
    • Mar 2014
    • 67

    Duplicate dropdown list

    Hi,

    I have a problem with dropdown list in combo box. Combo box row source returns 3 fields data likes revision, type, description. In these 3 fields, only revision may have duplicate number but type number is different. Bound column of this combo box is revision. Column count is 3 and width is 0,0,2. I need to show only description of that revision.

    For example, in dropdown list returns data like :
    1,1,'apple',
    1,2,'orange'

    When I choose second line 1,2,'orange' in combo box it should show 'orange' but it always show 'apple'

    Could anybody tell me how to fix this?
    Sophanna
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    The reason is because you have duplicates in revision. You need to use a unique field as the bound field.

    Comment

    • sophannaly
      New Member
      • Mar 2014
      • 67

      #3
      Hi Rabbit,

      As you said, in my list for revision or type alone may have duplicate value, then I take description as bound column, but all the value of combo box will change to the latest value that I just select from dropdown list.

      Could you give me ideas on how to solve this?
      Sophanna

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        It sounds like you didn't set the control source.

        Comment

        • jforbes
          Recognized Expert Top Contributor
          • Aug 2014
          • 1107

          #5
          You are trying to use a Combobox to select two values. It's only capable of selecting one all by itself. It will take some VBA magic to get this to work the way you want it to. If you don't want to resort to VBA, you'll need to split out the Revision and Type fields into two separate ComboBoxes.

          Google returned this article on how to attempt it if you are up for some programming, it basically creates a composite key for the two columns and splits them apart in code: http://answers.microsoft.com/en-us/o...9-820d9b107c2c I haven't tried this, so I don't know how well it will work.

          Comment

          • twinnyfo
            Recognized Expert Moderator Specialist
            • Nov 2011
            • 3653

            #6
            Would it be possible to change the bound column to column 2?

            Comment

            • sophannaly
              New Member
              • Mar 2014
              • 67

              #7
              Hi twinnyfo,

              Column 2 is type field, and it also has duplicate value. Only revision and type could make each row unique.

              Comment

              • sophannaly
                New Member
                • Mar 2014
                • 67

                #8
                Hi Rabbit,
                I already set control source to other table revision field.

                Comment

                • Rabbit
                  Recognized Expert MVP
                  • Jan 2007
                  • 12517

                  #9
                  All the boxes shouldn't change value whenever you select a new item unless the control is unbound.

                  Comment

                  Working...