473,836 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Primary key - yes (no duplicates) option not working!

2 New Member
Hello,

I created a database for a data collection experiment for my department. One field in my master table is "client ID" , we want no duplicate entries and this is determined by client ID number, i set the field as primary key, and made sure that the option " Yes (no duplicates) was stablished. Now my team has come accross the following issue and dont know why! They have tried to enter new client info in the respective form, often times the system tells them what they are trying to enter is a duplicate value, but when i go check the master table where all the info goes, the client ID is not in the list, ghe system should accept it, it's not a duplicate! What is happening?
Feb 26 '12 #1
5 7735
chocomon
10 New Member
please refer to this answer only if you have a secondary table that depends on the primary (master) table with the primary key, because i'm not sure if you do from your post!!!


are you saying that you have a primary table with a primary key?

and then you have another table what is embedded ex. as a datagridview in your other form? and then when your employees add to that second table...it gives you this error?

because the problem may be that unless you add the new clients FIRST in you're primary table..then you'll get that 'duplicate error'

this link talks about foreign keys...which your second table would have, i presume? it might help you understand what your problem is...

http://www.1keydata.com/sql/sql-foreign-key.html

(there's also a link on the side regarding primary tables)
Feb 26 '12 #2
Sheyla Ayala
2 New Member
No, this is a rather very simple database, it consist of a primary table, which already contains a given number of client IDs and names. I have other tables that are linked to the primary table, however not linked to the client ID Field. For instance, I have a table called "client responsiveness" and all it has is a column with three entries: positive, neutral, negative" I linked this table to the primary table to serve as combo box source for my primary table's client responsiveness field.

I had instructed my team to add more info into the primary table for each client already in it. I created a simple split form for this purpose. They asked if they can enter info for clients not included in the list, I said yes, as long as they are new clients (no duplicates), so they did. But they keep getting the error message that the data cannot be saved because that may cause duplicate values in the primary key...
Feb 27 '12 #3
Mihail
759 Contributor
Check Indexes.
I think that accidentally you have define more than one index.
You must have, as index, only the primary key.

In Access 2007 you find Indexes under Design tab.
I can't remember where is this feature in older versions but the Help files should help you to find it.

If this solve your problem, Ok.
If not I think you must post your database here and I'll take a look.
Feb 27 '12 #4
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
While I think Mihail is correct in assuming its a question of multiple defined indexes, I just want to add that there is nothing wrong with using more then 1 index, on the contrary. Any field you would expect to often perform joins or searches on, you should index.

That said it is application dependent on whether the field should allow duplicate values.
Feb 27 '12 #5
NeoPa
32,584 Recognized Expert Moderator MVP
It sounds like the problem is with something you're not telling us. It may be interesting to see exactly what happens with a specific record on entry. If you'd like us to check this for you then please follow the instruction in Attach Database (or other work) very carefully and include the ID of the item you tried to add that resulted in the error.
Feb 27 '12 #6

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

Similar topics

6
3592
by: John Simmons | last post by:
How is it that even though I have the column "username" in my database set as a Primary key, using my PHP script to add new users to the database works without any errors even when signing up using an existing username. I have a database full of the same usernames!
17
49841
by: Philip Yale | last post by:
I'm probably going to get shot down with thousands of reasons for this, but I've never really heard or read a convincing explanation, so here goes ... Clustered indexes are more efficient at returning large numbers of records than non-clustered indexes. Agreed? (Assuming the NC index doesn't cover the query, of course) Since it's only possible to have one clustered index, why is this almost always used for the primary key, when by...
5
3722
by: Ghulam Farid | last post by:
Hi i have a table with primary key defined on col1 and col2. now i want to have col3 also included in primary key. when i alter the table it gives me error for duplicate rows. there is an option for 'with nocheck' but it only works with check or foreign key constraint. is there any option in sql server like in oracle 'no validate' which doesnt validate the existing data and force the data validation from new records. thanx Farid
4
3630
by: Drew | last post by:
I have a permission tracking app that I am working on, and I have made the insert page for it. I am having issues on how to prevent duplicates from getting entered. Currently the interface for the app has a mixture of select boxes, list boxes and checkboxes. The form submits the page to processAIMR.asp and then does the inserting. I am using a loop to insert a new record for each checkbox checked or listbox entry selected. My...
7
5357
by: Philip | last post by:
Hey all, (Access 2000) I've been having a horror story with this design problem. My Database is Structured like This: AUTHORS, BOOKS, PAGES. Those are the Tables and each Item in each table needs a unique ID# based on its context. Primary Keys AUTHORS = AuthorID - NO Duplicates
6
2409
by: Marlene | last post by:
Hi All I have the following scenario, where I have found all the duplicates in a table, based on an order number and a part number (item).I might have something like this: Order PODate Rec Qty Invoice# Item Supplier Status POReceivedDate 570133 03/09/2004 50 0 DMEDIUM L0010 PENDING 03/09/2004 570133 03/09/2004 50 0 DMEDIUM L0010 PENDING 03/09/2004 570133 03/09/2004 50 0 DMEDIUM L0010 PENDING 03/09/2004
1
1513
by: Brian Keanie | last post by:
Used the "find duplicates" wizard to identify approx 500 duplicates in a single table. How do you delete the duplicates without doing it one at a time?
1
2018
by: GS | last post by:
set primary key option is greyed out in the dataset designer for a table Details In an vb.net express 2005 project, I have a dataset associated with table. lets call this table codetable. the dataset is an ms sql express mdf. in a different project, I use the vb studio data designer to change the codetable in the mdf. I set Primary Key first columns instead of just one. saved also changed the corresponding vsd file in designer.....
5
8304
by: limperger | last post by:
Hello everyone! Is out there any way to search for duplicate entries without using the "Find duplicates" option? In the Access 97 installed in my workplace, the Find duplicates option is disabled (don't ask me why) and I think that there are little chances of having it installed. Any wonder of how to overcome this situation without the aforementioned wizard? Thank you very much in advance Best regards from Barcelona
7
6869
by: john.cole | last post by:
I have searched all the groups I can, and I still haven't been able to come up the solution I need. I have the following problem. In my form named sbfrmSpoolList, I am entering a job, spool and revision number. My table is indexed properly to not allow duplicates, but I would like teh user to be notified that they are typing a duplicate via a message box, then I woulld the update of the record to be cancelled. I have tried the...
0
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10541
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10248
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6976
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5817
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.