Tables to block a duplicate entry and display message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emandel
    New Member
    • Dec 2006
    • 65

    Tables to block a duplicate entry and display message

    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
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by emandel
    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.

    Comment

    • emandel
      New Member
      • Dec 2006
      • 65

      #3
      Originally posted by ADezii
      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!

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by emandel
        That was easy! Thank you!
        Glad to be of assistance.

        Comment

        Working...