how can i get multiple primary keys

R

romona26

I am trying to put three or four primary keys in my policies table but i dont
know how to do it cab someone help me?
 
D

Daniel

3-4 PK? Are you sure about your design, normalization?

Anyways, it is very easy! open your table in design mode. Press and hold
the shift key and using your mouse select the fields to make PK out of.

You should now have 3-4 rows highlighted.

Right-click using the mouse (you still haven't let go of the shift key) and
select Primary Key.
 
R

Rick Brandt

romona26 said:
I am trying to put three or four primary keys in my policies table
but i dont know how to do it cab someone help me?

A table can have exactly one Primary Key.

If what you meant to say is that you want your one PK to consist of multiple
fields then hold shift or control so you can select multiple fields before
pressing the "key" in the toolbar.
 
B

boblarson

And just for your knowledge, if you do what Daniel and Rick have suggested
and create a primary key out of multiple fields the terminology, for your
future reference, is

COMPOSITE KEY


--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
J

Jerry Whittle

If you aren't looking for a composite primary key made out of multiple
fields, but rather, three or four fields that are each unique, you could make
each individual field a unique index. However that would lead me to believe
that Daniel is correct about your data not being properly normalized. More
likely you need 3 or 4 tables to store the unique data.
 

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

Top