iterates the AllTables collection, opens each nonsystem table, prints its structure, and then closes the open table.
Public Sub PrintTableStructures()
Dim tbl As Variant
For Each tbl In CurrentData.AllTables
If InStr(1, tbl.Name, "MSys", vbBinaryCompare) = 0 Then
DoCmd.OpenTable tbl.Name, acViewDesign
If MsgBox("Print table structure?", _
vbQuestion Or vbYesNoCancel, _
"Print Table Structure") = vbYes Then
DoCmd.PrintOut acPrintAll
End If
DoCmd.Close acTable, tbl.Name, acSaveNo
End If
Next
End Sub
Related examples in the same category