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  

unique composite key



 
 
Thread Tools Display Modes
  #1  
Old September 22nd, 2008, 02:02 PM posted to microsoft.public.access.tablesdbdesign
inungh
external usenet poster
 
Posts: 177
Default unique composite key

I would like to create a non-primary key, but unique composite index.

I know that I can create a unique index using index no diplicate
property of table and set primary key to set my compsite key.

I am not sure, does Access support unique composite index?

Like I want ot have myField1 and MyField2 have unique value, but they
are not primary key.


Your help is great appreciated,

  #2  
Old September 22nd, 2008, 02:48 PM posted to microsoft.public.access.tablesdbdesign
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default unique composite key

On Mon, 22 Sep 2008 06:02:20 -0700 (PDT), inungh
wrote:

Yes. Open the Indexes dialog. You can now create a composite index.

-Tom.
Microsoft Access MVP


I would like to create a non-primary key, but unique composite index.

I know that I can create a unique index using index no diplicate
property of table and set primary key to set my compsite key.

I am not sure, does Access support unique composite index?

Like I want ot have myField1 and MyField2 have unique value, but they
are not primary key.


Your help is great appreciated,

  #3  
Old September 22nd, 2008, 03:27 PM posted to microsoft.public.access.tablesdbdesign
inungh
external usenet poster
 
Posts: 177
Default unique composite key

On Sep 22, 9:48*am, Tom van Stiphout wrote:
On Mon, 22 Sep 2008 06:02:20 -0700 (PDT), inungh
wrote:

Yes. Open the Indexes dialog. You can now create a composite index.

-Tom.
Microsoft Access MVP



I would like to create a non-primary key, but unique composite index.


I know that I can create a unique index using index no diplicate
property of table and set primary key to set my compsite key.


I am not sure, does Access support unique composite index?


Like I want ot have myField1 and MyField2 have unique value, but they
are not primary key.


Your help is great appreciated,- Hide quoted text -


- Show quoted text -


I mean unique composite index.
Thanks again,
  #4  
Old September 22nd, 2008, 10:32 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default unique composite key

On Mon, 22 Sep 2008 07:27:08 -0700 (PDT), inungh wrote:

On Sep 22, 9:48*am, Tom van Stiphout wrote:
On Mon, 22 Sep 2008 06:02:20 -0700 (PDT), inungh
wrote:

Yes. Open the Indexes dialog. You can now create a composite index.

-Tom.
Microsoft Access MVP



I would like to create a non-primary key, but unique composite index.


I know that I can create a unique index using index no diplicate
property of table and set primary key to set my compsite key.


I am not sure, does Access support unique composite index?


Like I want ot have myField1 and MyField2 have unique value, but they
are not primary key.


Your help is great appreciated,- Hide quoted text -


- Show quoted text -


I mean unique composite index.
Thanks again,


Do what Tom suggested. Check the "Unique" checkbox on the dialog box.

Yes, Access can create a unique composite index, I believe on up to ten
fields.
--

John W. Vinson [MVP]
  #5  
Old September 23rd, 2008, 12:46 AM posted to microsoft.public.access.tablesdbdesign
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default unique composite key

What you do is enter an index name of your choice in only one row of the
first column of the dialogue, and the column names in separate rows of the
second column, leaving the first column blank for all but the first row.
Select the first row (the one with the index name) and then select 'Yes' as
the Unique property.

Ken Sheridan
Stafford, England

"inungh" wrote:

On Sep 22, 9:48 am, Tom van Stiphout wrote:
On Mon, 22 Sep 2008 06:02:20 -0700 (PDT), inungh
wrote:

Yes. Open the Indexes dialog. You can now create a composite index.

-Tom.
Microsoft Access MVP



I would like to create a non-primary key, but unique composite index.


I know that I can create a unique index using index no diplicate
property of table and set primary key to set my compsite key.


I am not sure, does Access support unique composite index?


Like I want ot have myField1 and MyField2 have unique value, but they
are not primary key.


Your help is great appreciated,- Hide quoted text -


- Show quoted text -


I mean unique composite index.
Thanks again,


  #6  
Old September 23rd, 2008, 01:34 PM posted to microsoft.public.access.tablesdbdesign
inungh
external usenet poster
 
Posts: 177
Default unique composite key

On Sep 22, 7:46*pm, Ken Sheridan
wrote:
What you do is enter an index name of your choice in only one row of the
first column of the dialogue, and the column names in separate rows of the
second column, leaving the first column blank for all but the first row. *
Select the first row (the one with the index name) and then select 'Yes' as
the Unique property.

Ken Sheridan
Stafford, England



"inungh" wrote:
On Sep 22, 9:48 am, Tom van Stiphout wrote:
On Mon, 22 Sep 2008 06:02:20 -0700 (PDT), inungh
wrote:


Yes. Open the Indexes dialog. You can now create a composite index.


-Tom.
Microsoft Access MVP


I would like to create a non-primary key, but unique composite index..


I know that I can create a unique index using index no diplicate
property of table and set primary key to set my compsite key.


I am not sure, does Access support unique composite index?


Like I want ot have myField1 and MyField2 have unique value, but they
are not primary key.


Your help is great appreciated,- Hide quoted text -


- Show quoted text -


I mean unique composite index.
Thanks again,- Hide quoted text -


- Show quoted text -


Thanks millions,

  #7  
Old September 24th, 2008, 10:28 PM posted to microsoft.public.access.tablesdbdesign
Armen Stein
external usenet poster
 
Posts: 507
Default unique composite key


leaving the first column blank for all but the first row


Don't feel bad - it isn't very intuitive to build a composite unique
index in Access. People have been asking about it for years.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 




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 11:09 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.