By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Problem w/Auto-Numbered Primary Key

P: 12
I am filling the sender & recipient fields for a logistics company's Invoice table by drawing from a single address table. I enter "new" addresses using two forms (one for the sender field, one for the recipient field) that populate the common address table and the Invoice table's record. As I attempt to create a new address the address table's primary key generates an auto-number, but when I go to close the form after the entry I get this prohibitory error message:

"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

What am I doing wrong? Is there a better way to do this?
Aug 18 '07 #1
Share this Question
Share on Google+
3 Replies


FishVal
Expert 2.5K+
P: 2,653
I am filling the sender & recipient fields for a logistics company's Invoice table by drawing from a single address table. I enter "new" addresses using two forms (one for the sender field, one for the recipient field) that populate the common address table and the Invoice table's record. As I attempt to create a new address the address table's primary key generates an auto-number, but when I go to close the form after the entry I get this prohibitory error message:

"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

What am I doing wrong? Is there a better way to do this?
Are you sure there are no any other field indexed with "no duplicates"?
Aug 18 '07 #2

P: 12
Yes, that was the problem! I am surprised I over looked that. I'm sorry to trouble you for something so trivial. Thank you very much for your help.
Aug 19 '07 #3

FishVal
Expert 2.5K+
P: 2,653
Yes, that was the problem! I am surprised I over looked that. I'm sorry to trouble you for something so trivial. Thank you very much for your help.
Don't worry. You didn't trouble me at all. You are quite welcome.
Aug 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.