Search notes:

DAO Object Model: TableDef

debug.print application.currentDb.tableDefs("sales").fields.count

Columns

The fields property can be used to iterate over a table's columns.
The following example prints the columns of the system table MSysObjects:
option explicit

sub main() ' {

    dim db as database
    set db = currentDb()

    dim t as tableDef
    set t = db.tableDefs("MSysObjects")

    dim col as field
    for each col in t.fields
        debug.print(col.name)
    next col

end sub ' }
Github repository about-MS-Office-object-model, path: /Access/TableDef/columns.bas
The type of the objects that are stored in the fields property is field2

Attributes

The attribute attributes is a long that is interpreted as a bit field.
The tableDefAttributeEnum lists some of these flags:
dbAttachedODBC 536870912 Linked ODBC database table.
dbAttachedTable 1073741824 Linked non-ODBC database table.
dbAttachExclusive 65536 Opens a linked Microsoft Access database engine table for exclusive use.
dbAttachSavePWD 131072 Saves user ID and password for linked remote table.
dbHiddenObject 1 Hidden table (for temporary use).
dbSystemObject -2147483646 System table. table }

See also

Access Object Model

Index