Subform duplicate data error.

G

Guest

A counselor selects a student in this database's form and then in a subform
the counselor makes course entries. We have been entering multiple courses in
the subform for 3 years. Now we get an error message saying we have a
duplication in an index, key field or relationship. I checked the key field
(an autonumber field) and the next number in the sequence shows up when data
is put into the subform's record for the student selected. There are no
indexes and the data goes into a table directly. Am I forgetting or missing
something?
 
G

Guest

check all field properties in both the main form and subform for the 'permit
duplicates'....

any field where that says 'no' may be your problem.

why an error now? not sure...but my guess is that it is logical rather than
technical...meaning that maybe there can be no duplicate in course
name/number by design - - but now 3 years later you are reusing a course
name/number that was once used before and still in the database...

you may be able to open the table and sort that column and eyeball for an
incorrect duplicate....

just a guess....but I've seen this situation before....the database was
working fine (i.e. it is suppose to throw the duplicate error)...it is the
input data that may be causing the problem....

if you think the auto number is generating a duplicate - that is also
possible in a case where there was a merge/append that entered in a sequence
that was not generated by the table....once again you can open the table,
sort and eyeball the sequence....

To reset the auto number - search this site on this topic and you will find
answers...

will be interested to know what you find....
 
G

Guest

Sorry about not getting back to thank you. You were correct, cpmpacting the
database was causing a assignment of a autonumber that had already been used.
I have corrected the autonumber field and removed the auto-compact property
from the database. So, THANK YOU!
JimN
 
G

Guest

I am glad you posted that follow up . I remember having read that compact
might do that but have never seen it in real life and so had forgotten that
possibility....

I believe that is fairly unusual but if others monitor this thread maybe
they can comment otherwise....
 

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