Duplicate values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that contains 4 fields for completion in a form.

I do not want users creating entries via the form where 2 of the fields
contain the same data as another record. I cannot set the table to disallow
duplicates on the fields individually as they are allowed and are correct,
however it is a combination of the two fields that I want to make unique -
how can this be achieved?
 
You can set up a unique index on the combination of the 2 fields:

1. Open your table in design view.

2. Open the Indexes box (View menu.)

3. Enter a name for this index.

4. Select the first field beside this name.

5. In the lower pane of the indexes box, set the Unique property to Yes.

6. On the next row of the dialog, leave the index name blank in the first
column, but specify the 2nd field in the next column.
 
Thanks that is it!
--
Kevin


Allen Browne said:
You can set up a unique index on the combination of the 2 fields:

1. Open your table in design view.

2. Open the Indexes box (View menu.)

3. Enter a name for this index.

4. Select the first field beside this name.

5. In the lower pane of the indexes box, set the Unique property to Yes.

6. On the next row of the dialog, leave the index name blank in the first
column, but specify the 2nd field in the next column.
 
Back
Top