Solved

Access can't add records

Posted on 2014-02-15
5
354 Views
Last Modified: 2014-02-18
While trying to add a record to an Access 2010 database, I get the following error...

"The changes you requested to the table were not successful because they would create a duplicate primary key in the database."

The confusing part of this is that the key is being auto-assigned by Access, not manually keyed in by me.

Any assistance is appreciated.

Thank You in advance.
0
Comment
Question by:jjolsz
5 Comments
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39861260
Hi,

This is a table/db design issue.  Please post a sample database so I can help.

Regards,

Bill
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 39861269
You may need to repair and compact the database.

/gustav
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 39861466
Open the table in design view and than open the indexes dialog.  Look for an index that is marked as unique.  That will be the one causing the problem.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39861806
You may get this message:
"they would create duplicate values in the index, primary key, or relationship"

Since Primary key is autonumber, then check index unique and make duplicate, or check any abnormality with relations.
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39861883
Hi,

Again - request that you post a sample DB with just the table design so we can help better.  It's impossible to determine the issue with the information supplied.

Thanks,

Bill
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question