Function DocTables()
Dim tbl As TableDef
Dim fld As Field
Dim TableFile
TableFile = "C:\TableDetails.txt"
'Delete previous copies
On Error Resume Next
Kill (TableFile)
On Error GoTo 0
'write out the current dataset
Open TableFile For Output As #1
For Each tbl In CurrentDb.TableDefs
For Each fld In tbl.Fields
Print #1, tbl.Name & "," & fld.Name & "," & fld.Type & "," & fld.Size
Next fld
Next tbl
End Function