Share via


TableDef.Attributes Property

Access Developer Reference

Sets or returns a value that indicates one or more characteristics of a TableDef object. Read/write Long.

Syntax

expression.Attributes

expression   A variable that represents a TableDef object.

Remarks

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

Example

This example displays the Attributes property for Field, Relation, and TableDef objects in the Northwind database.

Visual Basic for Applications
  Sub AttributesX()

Dim dbsNorthwind As Database Dim fldLoop As Field Dim relLoop As Relation Dim tdfloop As TableDef

Set dbsNorthwind = OpenDatabase("Northwind.mdb")

With dbsNorthwind

  ' Display the attributes of a TableDef object's 
  ' fields.
  Debug.Print "Attributes of fields in " & _
     .TableDefs(0).Name & " table:"
  For Each fldLoop In .TableDefs(0).Fields
     Debug.Print "  " & fldLoop.Name & " = " & _
        fldLoop.<strong class="bterm">Attributes</strong>
  Next fldLoop

  ' Display the attributes of the Northwind database's 
  ' relations.
  Debug.Print "Attributes of relations in " &amp; _
     .Name &amp; ":"
  For Each relLoop In .Relations
     Debug.Print "  " &amp; relLoop.Name &amp; " = " &amp; _
        relLoop.<strong class="bterm">Attributes</strong>
  Next relLoop

  ' Display the attributes of the Northwind database's 
  ' tables.
  Debug.Print "Attributes of tables in " &amp; .Name &amp; ":"
  For Each tdfloop In .TableDefs
     Debug.Print "  " &amp; tdfloop.Name &amp; " = " &amp; _
        tdfloop.<strong class="bterm">Attributes</strong>
  Next tdfloop

  .Close

End With

End Sub