Unique Property
Applies To
Index.
Description
You can use the Unique property to specify that an index enforces uniqueness of the data in the table's key index.
Setting
The Unique property uses the following settings.
Setting | Description | Visual Basic |
|
Yes | The index is a key (unique) index. | True (–1) |
No | The index is a non-key index. | False (0) |
You can set this property in the Indexes window of table Design view or by using Visual Basic.
Note To access the Unique property of an index by using Visual Basic, use the DAO Unique property.
Remarks
A key index optimizes finding records. It consists of one or more fields that uniquely arrange all records in a table in a predefined order. If the index consists of one field, values in that field must be unique. If the index consists of more than one field, duplicate values can occur in each field, but each combination of values from all the indexed fields must be unique. A non-key index has fields with values that are not necessarily unique.
An index is the primary index for a table if its Primary property is set to Yes. Each table can have only one primary index.See Also
IgnoreNulls property, Index object ("DAO Language Reference"), Indexes collection ("DAO Language Reference"), Primary property, Primary property ("DAO Language Reference").
Example
See the IgnoreNulls property example.