Article ID: 117536
Article Last Modified on 1/19/2007
Constant Description
----------------------------------------------------------------------
dbAttachExclusive For databases that use the Microsoft Jet database
engine, indicates the table is a linked table
opened for exclusive use.
dbAttachSavePWD For databases that use the Jet database engine,
indicates the user ID and password for the
linked table should be saved with the connection
information.
dbSystemObject Indicates the table is a system table.
dbHiddenObject Indicates the table is a hidden table (for
temporary use).
dbAttachedTable Indicates the table is a linked table from a
non-Open Database Connectivity (ODBC) database,
such as Microsoft Access or Paradox.
dbAttachedODBC Indicates the table is a linked table from an
ODBC database, such as Microsoft SQL Server or
ORACLE Server.
For a TableDef object, use of the Attributes property depends on the
status of TableDef, as the following table shows:
TableDef Usage --------------------------------- ---------- Object not appended to collection Read/write Base table Read-only Linked table Read-onlyWhen checking the setting of this property, you can use the AND operator to test for a specific attribute. For example, to determine whether a table object is a system table, perform a logical comparison of the TableDef Attributes property and the dbSystemObject constant.
Option Compare Database 'Use database order for string comparisons.
Option Explicit
Function ShowTableAttribs()
Dim DB As Database
Dim T As TableDef
Dim TType As String
Dim TName As String
Dim Attrib As String
Dim I As Integer
Set DB = CurrentDB()
For I = 0 To DB.Tabledefs.Count - 1
Set T = DB.Tabledefs(I)
TName = T.Name
Attrib = (T.Attributes And dbSystemObject)
MsgBox TName & IIf(Attrib, ": System Table", ": Not System Table")
Next I
End Function
Additional query words: dao
Keywords: kbhowto kbprogramming KB117536