Dim dbsNorthwind As Database
Dim tdfEmployees As TableDef
Dim idxLoop As Index
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set tdfEmployees = dbsNorthwind!Employees
With tdfEmployees
' Enumerate Indexes collection of Employees
' table.
For Each idxLoop In .Indexes
If idxLoop.Primary Then Debug.Print " Primary Key:";
Debug.Print " " & idxLoop.Name
Next idxLoop
End With