Of course, if you REALLY want to do it yourself, you could do something like
the following:
'-------------------------------------------
Sub ReadTableAndFieldDescriptions()
On Error GoTo Err_ReadTableAndFieldDescriptions
Dim db As DAO.Database
Dim tbl As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property
Dim NoDescription As Boolean
Set db = CurrentDb
For Each tbl In db.TableDefs
NoDescription = False
Set prp = tbl.Properties("description")
If NoDescription Then
Debug.Print "Table: " & tbl.Name
Else
Debug.Print "Table: " & tbl.Name & " Desc: " & prp.Value
End If
For Each fld In tbl.Fields
NoDescription = False
Set prp = fld.Properties("description")
If NoDescription Then
Debug.Print "Field: " & fld.Name & " Type: " & _
fld.Type & " Size: " & fld.Size
Else
Debug.Print "Field: " & fld.Name & " Type: " & _
fld.Type & " Size: " & fld.Size & " Desc: " & prp.Value
End If
Next
Next
Exit_ReadTableAndFieldDescriptions:
db.Close
Exit Sub
Err_ReadTableAndFieldDescriptions:
If Err.Number = 3270 Then
NoDescription = True
Resume Next
Else
MsgBox Err.Description
Resume Exit_ReadTableAndFieldDescriptions
End If
End Sub
'-------------------------------------------
Now this function just prints it to the Immediate Window, so you'd have to
modify it for printing or storing in a table or whatever. It also requires
a reference to DAO.
--
--Roger Carlson
Access Database Samples:
www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L