Okay, so I am pretty new to Access... I am creating a
table and I get this 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.
My help command doesn't seem to be working. Can someone
give me the lowdown on what has gone wrong? I don't even
understand what this error message means much less try to
fix it.
Many thanks...
Howard Brody - 22 Jan 2004 17:06 GMT
Where possible, you want your tables to have a Primary Key field - a field where the value in each record is different - as a means of identifying just which employee/product/region/etc you're referring to. In employee tables, the Social Security Number is usually used instead of the name because SSN's are unique names are not (my company currently has two people, not related, with the same first and last names).
Indexes are a type of sort used in a table that makes it faster to reference (ie use in a query). Indexes can be unique or duplicate (user sets the property).
Relationships are just that - relationships - built between fields in two tables. Foe example, the SSN can be used to relate the Employees table (where the SSN is unique and the Primary Key) to a Payroll table (where the SSN may be Indexed but is not unique because it will appear in each pay cycle, which is hopefully more than once). Relationships are the reason Access is a "Relational Database" system.
The error message means you tried to make a change to a table that would result in a duplicate value somewhere that's suposed to be unique. If you were indexing a field or making it the Primary Key, then it probably contains duplicate values somewhere. I'd look at the Primary Key of the table, the field you were updating, it's indexes and any relationships the field and table have.
Hope this helps!
Howard Brody
----- Michelle wrote: -----
Okay, so I am pretty new to Access... I am creating a
table and I get this 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.
My help command doesn't seem to be working. Can someone
give me the lowdown on what has gone wrong? I don't even
understand what this error message means much less try to
fix it.
Many thanks...
John Vinson - 22 Jan 2004 18:35 GMT
>Okay, so I am pretty new to Access... I am creating a
>table and I get this error message.
[quoted text clipped - 11 lines]
>
>Many thanks...
The message means just what it says. Let's pick it apart...
The changes you requested to the table were not successful
I couldn't do what you asked.
because they would create duplicate values in the index,
primary key, or relationship
You have some field defined as a Primary Key in your table. A
Primary Key must have a different value for every record in the entire
table. The record you are trying to add would put a value into this
Primary Key field that duplicates some record which is already in the
table.
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.
Change the data so that it doesn't duplicate existing data; or, if
you have specified a field in your Table with a unique Index, and it
doesn't need to be unique, change the Index properties in table design
view so that it's not unique.
You can also get this message if you're trying to make a field into a
primary key field, and there is already data in the table with
duplicates in that field. Use the Find Duplicates query wizard to
identify these records and fix them before setting your primary key.
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public