>
Constant | Description |
dbFixedField | The field size is fixed (default for Numeric fields). |
dbVariableField | The field size is variable (Text fields only). |
dbAutoIncrField | The field value for new records is automatically incremented to a unique Long integer that can't be changed (supported only for Microsoft Jet database tables). |
dbUpdatableField | The field value can be changed. |
dbDescending | The field is sorted in descending (Z to A or 100 to 0) order (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 (default). |
dbSystemField | The field is a replication field (on a TableDef object) used on replicable databases and cannot be deleted. |
Constant | Description |
dbRelationUnique | Relationship is one-to-one. |
dbRelationDontEnforce | Relationship isn't enforced (no referential integrity). |
dbRelationInherited | Relationship exists in a noncurrent database that contains the two attached tables. |
dbRelationUpdateCascade | Updates will cascade. |
dbRelationDeleteCascade | Deletions will cascade. |
Constant | Description |
dbAttachExclusive | For databases that use the Jet database engine, indicates the table is an attached table opened for exclusive use. This constant can be set on an appended TableDef object for a local table, but not for a remote table. |
dbAttachSavePWD | For databases that use the Jet database engine, indicates that the user ID and password for the remotely attached table are saved with the connection information. This constant can be set on an appended TableDef object for a remote table, but not for a local table. |
dbSystemObject | Indicates the table is a system table provided by the Jet database engine. This constant can be set on an appended TableDef object. |
dbHiddenObject | Indicates the table is a hidden table provided by the Jet database engine. This constant can be set on an appended TableDef object. |
dbAttachedTable | Indicates the table is an attached table from a non-ODBC database, such as a Microsoft Jet or Paradox® database (read-only). |
dbAttachedODBC | Indicates the table is an attached table from an ODBC database, such as Microsoft SQL Server (read-only). |
Object appended to | Usage |
Index | 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 | Read-only |
Recordset | Read-only |
Relation | Not supported |
TableDef | Read/write |
fldLastName.Attributes = dbVariableField + dbUpdatableFieldExample (Microsoft Access) The following example checks the Attributes property for each table in the current database, and prints the names of system and hidden tables provided by the Microsoft Jet database engine. Note that the And operator performs a bitwise comparison to determine whether an attribute is currently set.
Sub CheckAttributes() Dim dbs As Database, tdf As TableDef ' Return Database variable that points to current database. Set dbs = CurrentDb For Each tdf In dbs.TableDefs ' Compare property setting and constant in question. If (tdf.Attributes And dbSystemObject) Or _ (tdf.Attributes And dbHiddenObject) Then Debug.Print tdf.Name End If Next tdf End Sub