Solved

Access can't add records

Posted on 2014-02-15
5
368 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 50

Accepted Solution

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

/gustav
0
 
LVL 37

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

724 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