I have a table that has a number of fields, that are Indexes with No duplicates permitted.
Programatically adding data to the table in VBA, there is a slight chance that the Word Doc that a user sets up to import the data may have duplicates.
Now, for each field, I can overrule what the user has enterred to maintain no duplicates (ie if a duplicate is detected replace with a new value).
Given that there are multiple indexes in the table, is it possible to detect which index is causing the problem that raises the 3022 error (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.)
If it is, I would then be able to attempt the user's data, detect the error and then update the problem value. As it stands now, I have to do a Dlookup on each value, before adding it to the table. For the number of rows I have, and the low likelihood of having this problem, I would rather not have to do so many checks.
So, in summary, is there any way to identify which index causes the problem for a 3022 error?
Programatically adding data to the table in VBA, there is a slight chance that the Word Doc that a user sets up to import the data may have duplicates.
Now, for each field, I can overrule what the user has enterred to maintain no duplicates (ie if a duplicate is detected replace with a new value).
Given that there are multiple indexes in the table, is it possible to detect which index is causing the problem that raises the 3022 error (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.)
If it is, I would then be able to attempt the user's data, detect the error and then update the problem value. As it stands now, I have to do a Dlookup on each value, before adding it to the table. For the number of rows I have, and the low likelihood of having this problem, I would rather not have to do so many checks.
So, in summary, is there any way to identify which index causes the problem for a 3022 error?