Two Pimary keys

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I have a need to create a relationship between two tables. Each table has
two primary keys:

PK1= Billing Account Number (Telephone Number)
PK2= Billing Period (Date)

I am trying to create a 1 to 1 relationship between these tables using both
primary keys
..
Can this be done with Access 2000?

How do you do it?

I have tried to do this within the relationship window and can only link one
field..

Thank You,
Greg
 
There is no such thing as "two primary keys" in a tble. What you have is a
single primary key composed of two fields also known as a composite primary
key. You might think this is just nit-picking, but the terminology is
important.

Now, in order to create a relationship on a composite key, just click and
drag one of the fields onto the corresponding field in the other table.
Then right-click on the line and select Edit Relationship. In the box that
appears, you can add your addtional field to the primary key. Be sure to
click the check box for setting referential integrity.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Roger,
Thank You
Greg

Roger Carlson said:
There is no such thing as "two primary keys" in a tble. What you have is a
single primary key composed of two fields also known as a composite primary
key. You might think this is just nit-picking, but the terminology is
important.

Now, in order to create a relationship on a composite key, just click and
drag one of the fields onto the corresponding field in the other table.
Then right-click on the line and select Edit Relationship. In the box that
appears, you can add your addtional field to the primary key. Be sure to
click the check box for setting referential integrity.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top