Creating non-PK unique constraints in Access 2003

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?
 
A

Allen Browne

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
 

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