Prevent duplicates in junction table

Beemerang

Registered User.
Local time
Today, 21:23
Joined
Jan 25, 2014
Messages
67
Hi All

A [hopefully] quick question:

Attached is my many to many relationship setup. I would like to prevent the possibility of entering the same person more than once for the same training event. I am assuming that I do this by setting an index setting for a field the junction table?

Any advice appreciated!

Beem.
 

Attachments

  • Training Table relationships.JPG
    Training Table relationships.JPG
    39.2 KB · Views: 147
Make a unique composite index of the

lngEventID, lngParticipantID
 
Here is an image showing you how to do it.

The multiple field index is the one called "NoDuplicates". The Unique property should be set to yes on the first field, the second field (and third fourth, etc.) should have nothing listed in the index name column.

This means that they all belong to the same composite index.
 

Attachments

  • MultipleFieldIndex.jpg
    MultipleFieldIndex.jpg
    85.5 KB · Views: 180

Users who are viewing this thread

Back
Top Bottom