I have the following code (from Access Help) that prints out the names of my tables.
Sub AllTables()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
' Search for objects in AllTables collection.
For Each obj In dbs.AllTables
' Print name of obj.
Debug.Print obj.Name
Next obj
End Sub
I'd like to add another loop that would loop through the fields in each "obj" and print the fields associated with it. I've tried adding in the code from help for looping through the employees table in Northwind, but can't get it to work.
Any ideas for a "cheap & dirty" solution?
Sub AllTables()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
' Search for objects in AllTables collection.
For Each obj In dbs.AllTables
' Print name of obj.
Debug.Print obj.Name
Next obj
End Sub
I'd like to add another loop that would loop through the fields in each "obj" and print the fields associated with it. I've tried adding in the code from help for looping through the employees table in Northwind, but can't get it to work.
Any ideas for a "cheap & dirty" solution?