Article ID: 210362 - Last Review: October 11, 2006 - Revision: 2.2 HOW TO: Use the Attributes Property for TableDef Objects in Access 2000This article was previously published under Q210362 On This PageSUMMARY
You can use the Attributes property of a TableDef object to determine specific table properties. For example, you can use the Attributes property to find whether a table is a system table or a linked (attached) table.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. NOTE: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected. TableDef AttributesThe Attributes property of a TableDef object specifies characteristics of the table represented by the TableDef object. The Attributes property is stored as a single Long Integer and is the sum of the following Long constants:
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.
TableDef Usage --------------------------------- ---------- Object not appended to collection Read/write Base table Read-only Linked table Read-only Sample CodeNOTE: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected.The following user-defined sample function loops through all the tables in a database and displays a message box listing each table name and whether or not the table is a system table: REFERENCESFor more information about the Attributes property, click Microsoft Visual Basic Help on the
Help menu, type object properties in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
| Article Translations
|

Back to the top
