TableDef Description

  • Thread starter Thread starter Jay Myhre
  • Start date Start date
J

Jay Myhre

In my tables I have entered documentation information in the "Description"
column. I wish to print that. So far I have been able to print the field
name, datatype, and size. How do I add the "Description"? I've tried
fld.Description and fld.Properties("Description") but neither works. The
Tools/Analyzer/Documenter doesn't give the option of including "Description".
This is what my code looks like.

For Each tbl In db.TableDefs
For Each fld In tbl.Fields
Debug.Print fld.Name
Debug.Print fld.Type
Debug.Print fld.Size
 
See the TableInfo() function here:
http://allenbrowne.com/func-06.html

Access creates the Description property only when you fill a description in.
For fields that have no description, the property does not exist, so trying
to read the property generates an error.

The function above solves that problem by calling another little function to
read the Description if it exists, and recover from the error if it does
not.
 
Allen,
Thanks, that was exactly what I needed. I was close with
fld.Properties("Description"), just didn't know that it would create an error
if the field was blank.
Jay
 
Back
Top