By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,162 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,162 IT Pros & Developers. It's quick & easy.

Tables to block a duplicate entry and display message

emandel
P: 65
In my DB I have an Events Table, a Participants table, and a attendance table. The attendance table is the junction table that connects the other two (many to many).
So in the attendance tale, I record which participant ID came to which event ID.

Is there any way that I can block a duplicate entry, and have access tell the operator "oops - you already have that entry".

Thank you for your patience
Jan 2 '07 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,669
In my DB I have an Events Table, a Participants table, and a attendance table. The attendance table is the junction table that connects the other two (many to many).
So in the attendance tale, I record which participant ID came to which event ID.

Is there any way that I can block a duplicate entry, and have access tell the operator "oops - you already have that entry".

Thank you for your patience
A Composite, Primary Key consisting of the Participant ID and the Event ID
should do the trick. This will ensure that no participant can attend the specific
event more than once.
Jan 2 '07 #2

emandel
P: 65
A Composite, Primary Key consisting of the Participant ID and the Event ID
should do the trick. This will ensure that no participant can attend the specific
event more than once.
That was easy! Thank you!
Jan 3 '07 #3

ADezii
Expert 5K+
P: 8,669
That was easy! Thank you!
Glad to be of assistance.
Jan 4 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.