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  

Access97 and composite unique indexes



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2005, 02:05 AM
Jonathan Scott via AccessMonster.com
external usenet poster
 
Posts: n/a
Default Access97 and composite unique indexes

I am trying to put a unique constraint on three fields of a table, but in
the Index dialog it complains that I have three rows with the same name.
So, when I try to enter three column names on one line, it says there is
not such column.

Does Access97 not support composite unique indexes?

Jonathan Scott

--
Message posted via http://www.accessmonster.com
  #2  
Old April 8th, 2005, 02:33 AM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

Jonathan Scott via AccessMonster.com wrote:
I am trying to put a unique constraint on three fields of a table,
but in the Index dialog it complains that I have three rows with the
same name. So, when I try to enter three column names on one line, it
says there is not such column.

Does Access97 not support composite unique indexes?

Jonathan Scott


You entry in the index form should look like...

IndexName Field1
Field2
Field3

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #3  
Old April 8th, 2005, 02:35 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Fri, 08 Apr 2005 01:05:29 GMT, "Jonathan Scott via
AccessMonster.com" wrote:

I am trying to put a unique constraint on three fields of a table, but in
the Index dialog it complains that I have three rows with the same name.
So, when I try to enter three column names on one line, it says there is
not such column.

Does Access97 not support composite unique indexes?


Yes (for up to ten fields), but it's not instantly obvious how to set
one up.

Open the Indexes dialog (click the lightning-bolt-hitting-a-datasheet
idon). Enter a unique index name in the left column. Put the first
field in the right column across from the index name; the next field
in the right column in the next row down; and the third field one row
further down yet. It'll look something like

MyUniqueIndex FirstField
SecondField
ThirdField
SomeOtherIndex anotherfield

Check the "unique index" checkbox with the first row selected.

John W. Vinson[MVP]
  #4  
Old April 8th, 2005, 02:45 AM
Jonathan Scott via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Many thanks to the both of you. I now understand it.

Jonathan Scott

--
Message posted via http://www.accessmonster.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 06:21 PM.


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