Okay, so, if I understand you correctly, your users are getting error 3022 with an autonumber
primary key, right?
First, make a back-up copy of the back-end database (the database that includes the tblStudents
table). Then do a compact and repair of this database. You'll need to open the database in
exclusive mode to do this (ie. no other users have it open at the same time). Then click on Tools
Database Utilities > Compact and Repair.
Verify that you do not have any other fields indexed in this table, where the index type
displayed in the lower window is "Yes (No Duplicates)". Open the table in design view (again,
exclusive access required) and then click on View > Indexes. Select the first Index Name
displayed. Inspect the Unique property for this index displayed in the lower portion of the
window, then select the next index name, etc. until you've looked at all defined indexes. The
primary key should be unique, of course. If any other fields, or combinations of fields for a
multi-field index, are defined as unique then make sure that the new record is not attempting to
add duplicate information that the index specifically prohibits.
If you cannot find any unique indexes on fields other than your autonumber primary key that might
explain this error message, then you might possibly (?) have an issue with the JET database
engine attempting to assign a duplicate PK value. You might also have a corrupted database.
Question: Are all of your users using the latest JET service pack? See the following Knowledge
Base article for instructions on how to determine the current SP level for each user's
installation of JET:
How to obtain the latest service pack for the Microsoft Jet 4.0 Database Engine
http://support.microsoft.com/default.aspx?id=239114
Also, just for good measure, are all users using the latest service pack for the version of
Access that they are running?
You may need to try importing all of the tables in the back-end database into a brand new
database, in case this issue is corruption related.
Tom
________________________________________
However, as far as I know, the message you quoted in the original post:
"Risk of duplicates..." is not an Access or JET error message. It has to
be coming from somewhere, but it's not coming from the product itself.
Have you quoted the exact error message correctly?
They are using Access in French. So the message "Risk of..." was a
translation of mine. Belonging to the product, and not from different codes
that I copied, it should read:
"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. (Error 3022)"