Access97 and composite unique indexes

  • Thread starter Jonathan Scott via AccessMonster.com
  • Start date
J

Jonathan Scott via AccessMonster.com

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
 
R

Rick Brandt

Jonathan said:
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
 
J

John Vinson

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]
 
J

Jonathan Scott via AccessMonster.com

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

Jonathan Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top