Solved

Access can't add records

Posted on 2014-02-15
5
344 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
Comment Utility
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
Comment Utility
You may need to repair and compact the database.

/gustav
0
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
My experience with Windows 10 over a one year period and suggestions for smooth operation
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

8 Experts available now in Live!

Get 1:1 Help Now