Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access can't add records

Posted on 2014-02-15
5
Medium Priority
?
374 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 52

Accepted Solution

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

/gustav
0
 
LVL 39

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 31

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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 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