Solved

Access can't add records

Posted on 2014-02-15
5
351 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 34

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Outlook Free & Paid Tools
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 view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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.

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now