When I set up a table I set the autonumber as a primary key. Now I
need to add three other fields as primary key fields.
Can this be done? How?
Rick Brandt - 06 Oct 2005 13:56 GMT
> When I set up a table I set the autonumber as a primary key. Now I
> need to add three other fields as primary key fields.
>
> Can this be done? How?
A table can have exactly one primary key. That one key however can consist
of anywhere from one to (ten?) fields. One can also define unique indexes
in a table again consisting of one to ten fields that can exist alongside
the Primary Key. This latter is what you need.
Creating multi-column indexes that are not the PK is not one of the more
obvious things to do in Access. You need to open the table in design view
and then go to "View Indexes" in the menu. Then you enter your index like
this...
IndexName Field1Name
Field2Name
Field3Name
(At the bottom) Unique = Yes.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
ghillie5150 - 06 Oct 2005 20:17 GMT
Look up "composite primary key" on the net. Most of the time you have to
create this type of primary key because the table is an associative entity
remedying a many-to-many relationship.
> When I set up a table I set the autonumber as a primary key. Now I
> need to add three other fields as primary key fields.
>
> Can this be done? How?