How to put Two primary keys in one table

ccoogan

New member
Local time
Yesterday, 17:33
Joined
May 7, 2012
Messages
2
Two primary keys in one table
I am working in access 2010 and need to place two primary keys in one table. These two primary keys are also FK's, how do you do this? Ive have attached an example of what someone else did. The table I want to do this to is the assignment table in the attachment. i have read other posts and all I have seen say it cannot be done but in the attachment it was done.
 

Attachments

  • image001.jpg
    image001.jpg
    90.4 KB · Views: 2,204
With your table in design view, select the fields you want to make into Primary Key fields. If they are adjacent to each other you an simply click in the left margin area of the table design view and drag to select the desired fields. If they are not adjacent to each other you can select the first field and then hold down the ctrl key and select the other field. With the fields selected click the "Primary Key" button in the menu. Both fields will become primary key fields.
 
Thank You!!! Never though of doing that but it makes sense.
 
You are welcome. Glad to help.
 
just to be precise - this is not 2 primary keys. this is a single primary key, which happens to comprise multiple fields.
 

Users who are viewing this thread

Back
Top Bottom