By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,220 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,220 IT Pros & Developers. It's quick & easy.

How do I Allow Duplicate Values in a Field

P: 7
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
Jan 8 '12 #1
Share this Question
Share on Google+
20 Replies


NeoPa
Expert Mod 15k+
P: 31,707
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).
Jan 8 '12 #2

P: 7
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_value"
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
Jan 9 '12 #3

NeoPa
Expert Mod 15k+
P: 31,707
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.
Jan 9 '12 #4

Rabbit
Expert Mod 10K+
P: 12,421
I think, and I'm not 100% sure on this, that they have the following situation
Expand|Select|Wrap|Line Numbers
  1. Flat1 100
  2. Flat1 200
  3. 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.
Jan 9 '12 #5

NeoPa
Expert Mod 15k+
P: 31,707
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.
Jan 9 '12 #6

P: 7
I am sorry if my explanation are very complicated.This are the details of my form:
Table Name : "Properties Account Targeted"
Fields Name: "Properties";"Rent Amount";"Targeted Rent";"Difference"

Where "Properties" is the combo box and combo box Table name is "Combo_value"

"Combo_value" 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.
Jan 10 '12 #7

Rabbit
Expert Mod 10K+
P: 12,421
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.
Jan 10 '12 #8

NeoPa
Expert Mod 15k+
P: 31,707
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.
Jan 10 '12 #9

P: 7
"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?
Jan 10 '12 #10

NeoPa
Expert Mod 15k+
P: 31,707
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].
Jan 10 '12 #11

Rabbit
Expert Mod 10K+
P: 12,421
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.
Jan 10 '12 #12

P: 7
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.
Jan 11 '12 #13

NeoPa
Expert Mod 15k+
P: 31,707
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?
Jan 11 '12 #14

P: 7
Sir how to identify the required line by the [Property List] sir?
Jan 11 '12 #15

NeoPa
Expert Mod 15k+
P: 31,707
That depends on what type of access you're after. As most of your posts have little or no clear meaning I cannot say. I would expect somewhere within whatever access you try to be a string of the form "[Property List] = 'XXXXX'", where XXXXX is the value you want to specify. I cannot tell you any more as you've told us far too little of what you're doing and how you're doing it.
Jan 11 '12 #16

Rabbit
Expert Mod 10K+
P: 12,421
Post any code that you're using related to your problem.
Jan 11 '12 #17

P: 1
I'm also unclear exactly what the problem you are having is, but maybe this will help. You can set the value of TargettedRent = Comb_Value.Column(1)
This would return 100 when Flat 1, Flat 3 or Flat 5 were selected, 200 for Flat 2 and 4, etc.
Jan 11 '12 #18

P: 7
Details of my Form:
Table Name: Properties Account Targeted
Fields Name: "ID"' "Properties", "Rent Amount", "Targeted Rent" "Difference"

Combo box Table Name: Combo_value
Combo box Fields :"ID" "Properties", "Amount"

Value under Target Rented were duplicated.

ex:
[Properties] [Amount]
Flat1 100
Flat2 200
Flat3 100
Flat4 200
Flat5 100
Flat6 200
and so on......

Control Source- Targeted Rent
Row Source - SELECT [Combo_value].[Amount], [Combo_value].[Properties], [Combo_value].[ID] FROM Combo_value ORDER BY [Properties];

If i click the combo box it is only uses the first one.
Jan 12 '12 #19

Rabbit
Expert Mod 10K+
P: 12,421
And it should only use one. If you click on one item, you should only expect one item to be clicked. I have no idea what you're trying to accomplish. One equals one. One does not equal three.

Try explaining your business requirements, not your attempted solution.
Jan 12 '12 #20

NeoPa
Expert Mod 15k+
P: 31,707
Ashlot:
If i click the combo box it is only uses the first one.
Does that mean the first column (IE. [Amount]) or the first record (IE. Flat1 100)?
As the control is bound to the [Targeted Rent] field, I don't understand why this is a problem.
Ashlot:
Value under Target Rented were duplicated.
Why would this be a problem? As far as I can see many properties can have the same rental value without anything being wrong. What is it that this is all about and that you haven't explained yet?
Jan 12 '12 #21

Post your reply

Sign in to post your reply or Sign up for a free account.