Creating non-PK unique constraints in Access 2003

  • Thread starter Thread starter dave.j.thornton
  • Start date Start date
D

dave.j.thornton

I need my PK to be a single field so that I can establish parent-child
relationships. Therefore I create an autonum field at the top of my
table, and designate that as my PK.

I also need a composite uniqueness constraint on two of the real
fields in the table. I can't seem to find a good step-by-step for
making this non-PK constraint. I can get to the indexes dialog box,
but I've tried a couple things, and none of them seem to resuly in a
constraint. Can someone walk me through it?
 
1. In the indexes dialog, click in the first blank row, and enter a name for
the index and the first field

2. In the lower pane set the Unique property to Yes.

3. On the next row of the dialog, leave the index name blank.
This indicates to Access that this row is part of the previous index.

As a silly example, the dialog might look like this when you create a unique
index on the combination of Surname + FirstName:

SurnameFirstName Surname
FirstName
 
Back
Top