How do I Allow Duplicate Values in a Field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ashlot
    New Member
    • Jan 2012
    • 7

    How do I Allow Duplicate Values in a Field

    Hello

    I got a problem on my combo box.I am now using ms access 2007.It is that when u select the list on my combo box there is some value that selected and the others are not.The list on my combo box have some amount that every time u select on the list there is amount that goes on the other field.I think its because the amount which i put on the value of the list have lots of duplicate. How can i allow duplicates value on a field.Thanks
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32653

    #2
    Originally posted by Ashlot
    Ashlot:
    How can i allow duplicates value on a field
    The rest of the question makes little or no sense and had it not been for this bit at the end would have been deleted. However, this small part makes sense so I can answer it.

    When in Design mode of a table, navigate to the relevant field and look down the properties for one called "Indexed". If this is set to No then duplicates will be allowed by there will be no index. Otherwise, if an index is also required, then choose Yes (No duplicates).

    Comment

    • Ashlot
      New Member
      • Jan 2012
      • 7

      #3
      Hi Neo...

      Thanks for responding.But i already tried those things Yes(No Duplicates)and No but still not working.
      this is the ex:
      Tablename - "Combo_valu e"
      Fieldname - "Properties " and "Amount"

      "Properties " field is the combo box and the amount every time it clicks the list in the combo goes directly to "Amount" field.

      Properties Amount

      Flat 1 10,000
      Flat 2 7,000
      Flat 3 10,000
      Flat 4 7,000
      Flat 5 5,000
      Flat 6 5,000
      Flat 7 10,000
      Flat 8 5,000
      and so on..

      Some of the "Properties " value were selected but the others which have the same value cannot be selected..Can you pls help me about this.I am just new in this program..Thanks

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32653

        #4
        Originally posted by Ashlot
        Ashlot:
        "Properties " field is the combo box and the amount every time it clicks the list in the combo goes directly to "Amount" field.
        I wish I could help. Unfortunately, what you say and how you say it makes so little actual sense I have very little idea what you're saying. Take the quoted line above for instance. "Properties " field is the combo box makes no sense. It has a subject, a verb and an object, yet it's an impossible statement. It makes no sense. the amount every time it clicks the list in the combo goes directly to "Amount". This implies somehow the amount is doing some clicking. Assuming the easy assumption that the operator is doing the clicking, it says the amount goes directly to "Amount". What that is supposed to be telling me I have no idea. This was a good example line, but the rest follows on similar lines. Some of the information provided is sensible - unfortunately the explanation that goes with it is inadequate even to ask a relatively simple question.

        Try to understand that it is your responsibility to write in sentences that make sense. I am here to give technical help - not to translate poorly worded questions into sense for you just to get to the question. The former I am happy to do. The latter irritates me intensely. Maybe because I'm good at the former and, though I can express myself very clearly, I'm useless at guessing what people are trying to say when they write it without any consideration for the reader.

        Now, as far as the question asked is concerned, the answer I gave is correct (This isn't guesswork on my part. I know this absolutely. It's not a hard one). If that doesn't match the question you intended to be answered, then I can only suggest you ask the question properly in future.

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          I think, and I'm not 100% sure on this, that they have the following situation
          Code:
          Flat1 100
          Flat1 200
          Flat1 300
          And they're using code to populate the amount depending on the selection in the combo box that lists the flats, probably using some sort of DLookup. But since there are duplicates, it can't uniquely identify which record to use so it just uses the first one.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32653

            #6
            So the term duplicate here really means Duplicate property? Even though it only makes sense in this context as duplicate record. Maybe that's their problem then. Simply identify the whole record (when looking for a unique record) rather than a non-unique field.

            That said, if that is the case then the data supplied in post #3 would have to be very misleading indeed, as there are no duplicates even of the [Properties] field there.

            Comment

            • Ashlot
              New Member
              • Jan 2012
              • 7

              #7
              I am sorry if my explanation are very complicated.Thi s are the details of my form:
              Table Name : "Properties Account Targeted"
              Fields Name: "Properties";"R ent Amount";"Target ed Rent";"Differen ce"

              Where "Properties " is the combo box and combo box Table name is "Combo_valu e"

              "Combo_valu e" was composed of two fields which are "Property List" and "Amount".

              "Property List" "Amount"
              1. Flat 1 100
              2. Flat 2 200
              3. Flat 3 100
              4. Flat 4 200
              5. Flat 5 100
              6. so on...

              And every time the "Property List" selected the Corresponding amount will go directly to "Targeted Rent"
              which is the Control Source of the "Properties "

              As you can see in the "Property List" there is no duplicate value but on the "Amount" there is a lots of duplicate values.And Yes Sir Rabbit you are true that the record cannot identify and only uses the first one.Your help is highly appreciated.

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                That tells us absolutely nothing. Look at post 5 and tell us if that is your situation. If not, you need to make another attempt at explaining in plain english what you're trying to achieve.

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32653

                  #9
                  Originally posted by NeoPa
                  NeoPa:
                  Maybe that's their problem then. Simply identify the whole record (when looking for a unique record) rather than a non-unique field.
                  The quote from post #6 explains the solution if that is your problem. The explanation is still very vague and you haven't explained how you would ever get into that problem in the first place. It seems quite obvious - so it's hard to know if we understand you correctly even now. All in all, still very messy.

                  Comment

                  • Ashlot
                    New Member
                    • Jan 2012
                    • 7

                    #10
                    "And they're using code to populate the amount depending on the selection in the combo box that lists the flats, probably using some sort of DLookup. But since there are duplicates, it can't uniquely identify which record to use so it just uses the first one." Sir Rabbit this statement was my problem.And Sir Neo how can i identify the whole record?

                    Comment

                    • NeoPa
                      Recognized Expert Moderator MVP
                      • Oct 2006
                      • 32653

                      #11
                      You identify the whole record either by specifying a unique index in the criteria or by specifying enough separate fields as to make the selection unique. I assume in your situation that might be [Property List] and [Amount].

                      Comment

                      • Rabbit
                        Recognized Expert MVP
                        • Jan 2007
                        • 12517

                        #12
                        I still don't understand your problem. You say that my example represents your problem, yet your second set of sample data doesn't have the same characteristics as my sample data. So either you are giving us faulty data or you don't understand what I said.

                        From your second set of sample data. The property field looks to be unique while amount is duplicated. That's not a problem at all because you can uniquely identify a record by the property field.

                        At this point I am utterly and completely confused.

                        All I can make out is you have a combo box. You select a property from the combo box. Then that's where everything breaks down.

                        Comment

                        • Ashlot
                          New Member
                          • Jan 2012
                          • 7

                          #13
                          Forgive me sir because i am new on this program. Yes sir i have combo box and if i select,it selected only the first one.Only the amount is duplicated sir.

                          Comment

                          • NeoPa
                            Recognized Expert Moderator MVP
                            • Oct 2006
                            • 32653

                            #14
                            If only the amount is duplicated it's hard to understand how you have any problem. Simply identify the required line by the [Property List]. How can there be a problem here?

                            Comment

                            • Ashlot
                              New Member
                              • Jan 2012
                              • 7

                              #15
                              Sir how to identify the required line by the [Property List] sir?

                              Comment

                              Working...