Hi,
Here is VBA code that will print a list of non-system tables within a database. Optionally, it will print a list of all fields as well. The output for this will go into the Immediate Window, which is accessible via CTRL-G. The results of this can be dropped into Word, or even Notepad for printing.
You may want to place this code into a new Module, perhaps called "modTableInfo".
Public Sub GetTableInfo()
Dim db As Database, tbl As TableDef, fld As Field
Set db = CurrentDb
Debug.Print " ", db.Name
Debug.Print " "
Debug.Print "Table Created Modified # Recs"
Debug.Print "----- ------- -------- ------"
For Each tbl In db.TableDefs
If Left$(tbl.Name, 4) <> "MSys" Then
Debug.Print tbl.Name & " " & tbl.DateCreated & " " & _
tbl.LastUpdated & " " & tbl.RecordCount
' optional code to print all the fields
'For Each fld In tbl.Fields
' Debug.Print fld.Name
'Next fld
End If
Next tbl
End Sub
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.