Class Index (DAO VBA)

Index objects specify the order of records accessed from database tables and whether or not duplicate records are accepted, providing efficient access to data. For external databases, Index objects describe the indexes established for external tables (Microsoft Access workspaces only).

Class TableDef gives access to class Index.


Dim idx as Index
Set idx = Workspaces(1).Databases(1).TableDefs(1).Indexes(Item:=1)

Methods

CreateField - Creates a new Field object (Microsoft Access workspaces only).

CreateProperty - Creates a new user-defined Property object (Microsoft Access workspaces only).

Properties

Clustered sets or returns a value that indicates whether an Index object represents a clustered index for a table (Microsoft Access workspaces only).

DistinctCount returns a value that indicates the number of unique values for the Index object that are included in the associated table (Microsoft Access workspaces only).

Fields returns a Fields collection that represents all stored Field fieldss for the specified fields. Read/write.

Foreign returns a value that indicates whether an Index object represents a foreign key in a table (Microsoft Access workspaces only).

IgnoreNulls sets or returns a value that indicates whether records that have Null values in their index fields have index entries (Microsoft Access workspaces only).

Name returns or sets the name of the specified object. Read/write String if the object has not been appended to a collection.

Primary sets or returns a value that indicates whether an Index object represents a primary key index for a table (Microsoft Access workspaces only).

Properties returns the Properties collection of the specified object.

Required sets or returns a value that indicates whether a Field object requires a non-Null value.

Unique sets or returns a value that indicates whether an Index object represents a unique (key) index for a table (Microsoft Access workspaces only).

Field - A Field object represents a column of data with a common data type and a common set of properties.

Fields - A Fields collection contains all stored Field objects of an Index, QueryDef, Recordset, Relation, or TableDef object.

Properties - A Properties collection contains all the Property objects for a specific instance of an object.

Property - A Property object represents a built-in or user-defined characteristic of a DAO object.