Sub ShowTables()
Dim TblDef As TableDef
For Each TblDef In CurrentDb.TableDefs
If (TblDef.Attributes And dbSystemObject) = 0 Then
Debug.Print TblDef.Name
Dim Fld As Field
For Each Fld In TblDef.Fields
Debug.Print " " & Fld.Name
Next Fld
End If
Next TblDef
End Sub
this will not work for linked tables; for that case you need to open the other database, e.g.
Dim OtherDB as database
Set OtherDB = OpenDatabase("Blah.mdb"
for each tbldef in otherdb.tabledefs
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.