Attributes Property

    Example    Applies To    Specifics

Sets or returns a value that indicates one or more characteristics of a Field, Relation, or TableDef object.

Settings and Return Values

The setting or return value is Long data type, and the default value is 0.

For a Field object, the value specifies characteristics of the field represented by the Field object and can be a combination of these constants.

Constant Description
dbAutoIncrField The field value for new records is automatically incremented to a unique Long integer that can't be changed (in a Microsoft Jet workspace, supported only for Microsoft Jet database(.mdb) tables).
dbDescending The field is sorted in descending (Z to A or 100 to 0) order; this option applies only to a Field object in a Fields collection of an Index object. If you omit this constant, the field is sorted in ascending (A to Z or 0 to 100) order. This is the default value for Index and TableDef fields (Microsoft Jet workspaces only).
dbFixedField The field size is fixed (default for Numeric fields).
dbHyperlinkField The field contains hyperlink information (Memo fields only).
dbSystemField The field stores replication information for replicas; you can't delete this type of field (Microsoft Jet workspaces only).
dbUpdatableField The field value can be changed.
dbVariableField The field size is variable (Text fields only).

For a Relation object, the value specifies characteristics of the relationship represented by the Relation object and can be a combination of these constants.

Constant Description
dbRelationUnique The relationship is one-to-one.
dbRelationDontEnforce The relationship isn't enforced (no referential integrity).
dbRelationInherited The relationship exists in a non-current database that contains the two linked tables.
dbRelationUpdateCascade Updates will cascade.
dbRelationDeleteCascade Deletions will cascade.
dbRelationLeft Microsoft Access only. In Design view, display a LEFT JOIN as the default join type.
dbRelationRight Microsoft Access only. In Design view, display a RIGHT JOIN as the default join type.

Note   If you set the Relation object's Attributes property to activate cascading operations, the Microsoft Jet database engine automatically updates or deletes records in one or more other tables when changes occur in related primary tables.

For example, suppose you establish a cascading delete relationship between a Customers table and an Orders table. When you delete records from the Customers table, records in the Orders table related to that customer are also deleted. In addition, if you establish cascading delete relationships between the Orders table and other tables, records from those tables are automatically deleted when you delete records from the Customers table.

For a TableDef object, the value specifies characteristics of the table represented by the TableDef object and can be a combination of these Long constants.

Constant Description
dbAttachExclusive For databases that use the Microsoft Jet database engine, the table is a linked table opened for exclusive use. You can set this constant on an appended TableDef object for a local table, but not on a remote table.
dbAttachSavePWD For databases that use the Microsoft Jet database engine, the user ID and password for the remotely linked table are saved with the connection information. You can set this constant on an appended TableDef object for a remote table, but not on a local table.
dbSystemObject The table is a system table provided by the Microsoft Jet database engine. You can set this constant on an appended TableDef object.
dbHiddenObject The table is a hidden table provided by the Microsoft Jet database engine. You can set this constant on an appended TableDef object.
dbAttachedTable The table is a linked table from a non-ODBC data source such as a Microsoft Jet or Paradox database (read-only).
dbAttachedODBC The table is a linked table from an ODBC data source, such as Microsoft SQL Server (read-only).

Remarks

For an object not yet appended to a collection, this property is read/write.

For an appended Field object, the availability of the Attributes property depends on the object that contains the Fields collection.

If the Field object belongs to an Then Attributes is
Index object Read/write until the TableDef object that the Index object is appended to is appended to a Database object; then the property is read-only.
QueryDef object Read-only
Recordset object Read-only
Relation object Not supported
TableDef object Read/write

For an appended Relation object, the Attributes property setting is read-only.

For an appended TableDef object, the property is read/write, although you can't set all of the constants if the object is appended, as noted in Settings and Return Values.

When you set multiple attributes, you can combine them by summing the appropriate constants. Any invalid values are ignored without producing an error.