Table Documentation

  • Thread starter Claudette Hennessy
  • Start date
C

Claudette Hennessy

I have a query that lists all the objects in my database; I would like to
retrieve from somewhere the values for the Descriptions property for my
objects that is shown in the objects pane?

SELECT MSysObjects.Name, "Query" AS Object," " as Comment
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "*~*") AND ((MSysObjects.Type)=5))
UNION
SELECT MSysObjects.Name, "Table" AS Object," " as Comment
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "*msys*") AND ((MSysObjects.Type)=1))
UNION
SELECT MSysObjects.Name, "Report" AS Object," " as Comment
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "*~*") AND ((MSysObjects.Type)=-32764))
UNION SELECT MSysObjects.Name, "Forms" AS Object," " as Comment
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "*~*") AND ((MSysObjects.Type)=-32768))
ORDER BY 2, 1;

Thanks in advance,
Claudette Hennessy
 
A

Allen Browne

Claudette, you will need to read those from the properties of the TableDef,
e.g.:
Currentdb.TableDefs("Table1").Properties("Description")

The expression will error if there is no Description property for a table.

For an example of how to loop through the Fields of the TableDef to get the
name, type, size and Description of each one, see:
http://allenbrowne.com/func-06.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top