Index Duplicates

G

Guest

I am creating a database with several subtables that each have lookup cells
in them. The main table has three lookup cells. It has a subtable in it
without lookup cells. That subtable has a subtable in it with two lookup
cells. I can input data into the main table and the first subtable without
any problem. However, it gives the following error when I try and input data
into the subtable that's within the subtable.

"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 of fields that contain duplicate data, remove
the index, or redefine the index to permit duplicate entries and try again."

None of my columns have identical names nor does any row have the exact same
thing in it as another row. I cannot find where the duplicate is occuring
nor can I figure out a way to organize my tables any better.

Are there any suggestions on fixing my problem?
 
G

Guest

The duplication would be in the field or combination of fields in an index
that is set for no duplicates. The complete record is not necessarily a
duplicate.

Open the table in design view, click on menu VIEW, Indexes. Click on each
index and look in the window below to see which index is set to No Duplicates.

Build a totals query with the field(s) and then add the first field, setting
the Totals: for that field to Count. Enter >1 for criteria to find the
duplicate.
 
G

Guest

Each table only has one index so each one is a no duplicates index. I must
be doing something wrong when I make the totals query because it's not
showing any duplicates. The main table and the two subtables each have a no
duplicates Index that is the primary key. I put the indexes of each of the
three tables into a totals query and set the totals row to count and made the
criteria >1. What should I do?
 
P

Pat Hartman\(MVP\)

If you are using forms (you should be) to input the data, make sure that the
master/child links are properly set. It sounds like the subform's foreign
key is not being populated correctly.
 
G

Guest

I am creating an HTML interface to input the data using the pages feature.
The subform that's within the subform has three columns in it that are user
inputs all of which need to allow duplicate entries. If I allow one of the
columns to be the index with duplicates then the webpage won't allow
additions to be made to the database at that level. How can I fix this
without adding a meaningless user input column as a non-repetitive foreign
key?
 
G

Guest

Let us back up and understand some terms --Just what is a "lookup cell?"
What do you mean by subtables?
 
P

Pat Hartman\(MVP\)

Access (Jet) allows up to 10 columns in a primary key or index. To create a
multi-field primary key, click to select the first field and then while
holding down the cntl key, select up to 9 more columns. When all the "key"
columns are highlighted, press the key button on the toolbar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top