Re: How to create Composite keys in an ACCESS table

From: John Vinson (jvinson_at_STOP_SPAM.WysardOfInfo.com)
Date: 05/25/04


Date: Mon, 24 May 2004 20:50:44 -0600

On Mon, 24 May 2004 15:24:41 -0700, "Thelma McCoy"
<anonymous@discussions.microsoft.com> wrote:

>I have created tables for an Access database on my pc at
>home. It is not connected to an SQL server. One table in
>my database needs a composite key consisting of three
>fields. It appears that my version of Access 2002 allows
>only a single field to be a key. Is this a limitation of
>the Home Edition Windows XP Access 2002 product?

No, it is not. You can create a composite key on up to TEN fields!

To do so, open the Table in design view. To create a multifield
Primary Key, ctrl-click each field that will be part of the key (so
that they are all highlighted); then click the key icon.

If you want a multifield Index, click the indexes icon (looks like
lightning hitting a data***); type a name for the index in the left
column and select up to ten fields in that row and succeeding rows in
the right column, e.g.

idxNameAddr LastName
              FirstName
              Suffix
              Address1
              PostCode

                  John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public'