Results 1 to 5 of 5
  1. #1
    Count Duckula is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    12

    Table allowing duplicate primary keys

    Hi,



    I've set up a table with 2 primary keys but it is allowing me to input the same combinations twice!

    Not sure what's going wrong.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Sounds to me like you haven't successfully set up the table to have a multi-field primary key.
    If done properly, if you go to the Design View of the table, you should see a key to the left of both of those fields.
    Do you see that?

  3. #3
    Count Duckula is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    12
    Yeah there's a key next to both fields. I've set up tables with multi-field primary keys before and not had this problem.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Yeah there's a key next to both fields. I've set up tables with multi-field primary keys before and not had this problem.
    I don't see how that could happen, unless you really do not have duplicates.
    Check for trailing spaces or other minor things who could make entries that "appear to be the same" really not be the same.

    Other than that, I think we would need to actually see an example of this. You can upload a database showing this (just be certain to remove any confidential information).
    I cannot download files from my present location, but can from home tonight. Or someone may take a look at it before I get a chance to.

  5. #5
    Count Duckula is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    12
    Sorry it's just me being a complete idiot. Of course it doesn't allow duplicates sorry.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Multiple Primary Keys
    By JonathanOz in forum Access
    Replies: 2
    Last Post: 03-22-2013, 08:32 AM
  2. Primary Keys & Relationships
    By Njliven in forum Programming
    Replies: 4
    Last Post: 12-17-2012, 09:42 AM
  3. Replies: 3
    Last Post: 09-25-2012, 05:24 PM
  4. Replies: 11
    Last Post: 06-11-2012, 12:23 AM
  5. Primary and Secondary Keys...
    By LittleOleMeDesigns in forum Database Design
    Replies: 5
    Last Post: 07-24-2009, 11:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums