No 3 way Duplicates

T

TitaniaTiO2

How do I put into my code to look for duplicates when looking at three
variables.

I do not want a duplicate to occur for:

PersonID, DocumentNumber, and HistoryTrainedTo. on tblTraining.

Any suggestions?

Thanks

Titania
 
J

John W. Vinson

How do I put into my code to look for duplicates when looking at three
variables.

I do not want a duplicate to occur for:

PersonID, DocumentNumber, and HistoryTrainedTo. on tblTraining.

Any suggestions?

Thanks

Titania

Create an Index on these three fields. To do so, open the table in design view
and select the Indexes tool - looks like a lightning bolt hitting a datasheet.

Put some distinctive name in the first row of the left column
(idxPersonDocHist maybe). Put the three fields in the second column, in that
row and the two subsequent rows. Select the first row and check the "Unique
Index" checkbox.
 
T

TitaniaTiO2

Perfect Thanks.


John W. Vinson said:
Create an Index on these three fields. To do so, open the table in design view
and select the Indexes tool - looks like a lightning bolt hitting a datasheet.

Put some distinctive name in the first row of the left column
(idxPersonDocHist maybe). Put the three fields in the second column, in that
row and the two subsequent rows. Select the first row and check the "Unique
Index" checkbox.
 
Top