R
Richard
Table X has columns Group, B, and C
With a group, neither B nor C should contain duplicates
Index1 is Group/B unique
Index2 is Group/C unique
G_one, 1, 1 ok
G_one, 1, 2 <- Index1 unique constraint violated
G_one, 2, 1 <- Index2 unique constraint violated
G_one, 3, 4 ok
G_one, 3, 4 <- both unique constraints violated
When the constraint is violated the dialog
"
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.
"
appears.
Data entry is done through a form.
How would I trap the error condition and identify which index
constraint was being violated.
Want to display messages like
"Can't use " & B & " because it has been used before"
"Can't use " & C & " because it has been used before"
"Can't use " & B & " or " & C & " because each has been used before"
With a group, neither B nor C should contain duplicates
Index1 is Group/B unique
Index2 is Group/C unique
G_one, 1, 1 ok
G_one, 1, 2 <- Index1 unique constraint violated
G_one, 2, 1 <- Index2 unique constraint violated
G_one, 3, 4 ok
G_one, 3, 4 <- both unique constraints violated
When the constraint is violated the dialog
"
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.
"
appears.
Data entry is done through a form.
How would I trap the error condition and identify which index
constraint was being violated.
Want to display messages like
"Can't use " & B & " because it has been used before"
"Can't use " & C & " because it has been used before"
"Can't use " & B & " or " & C & " because each has been used before"