A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to create Composite keys in an ACCESS table



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 11:24 PM
Thelma McCoy
external usenet poster
 
Posts: n/a
Default How to create Composite keys in an ACCESS table

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?
  #2  
Old May 24th, 2004, 11:48 PM
Joan Wild
external usenet poster
 
Posts: n/a
Default How to create Composite keys in an ACCESS table

"Thelma McCoy" wrote in message
...
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?


What makes you think that? Are you getting an error when you attempt to
create it?

In design view, you can select the three fields (hold the Ctrl key down
while you select the fields) and then hit the Primary Key button on the
toolbar.


--
Joan Wild
Microsoft Access MVP


  #3  
Old May 25th, 2004, 12:38 AM
Thelma McCoy
external usenet poster
 
Posts: n/a
Default How to create Composite keys in an ACCESS table

Thank you. That worked. The instruction book I was using
didn't mention the CTRL Key.
-----Original Message-----
"Thelma McCoy"

wrote in message
...
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?


What makes you think that? Are you getting an error when

you attempt to
create it?

In design view, you can select the three fields (hold the

Ctrl key down
while you select the fields) and then hit the Primary Key

button on the
toolbar.


--
Joan Wild
Microsoft Access MVP


.

  #4  
Old May 25th, 2004, 03:50 AM
John Vinson
external usenet poster
 
Posts: n/a
Default How to create Composite keys in an ACCESS table

On Mon, 24 May 2004 15:24:41 -0700, "Thelma McCoy"
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 datasheet); 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'
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.