I have a query that prints out a list of database objects. I would like to
add the property description that is visible in the object list pane. Does
anybody know how to retrieve this?
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;
thank you in advance,
Claudette Hennessy
Hi,
not sure, that you can get description using SQL, you can use VBA, here for
queries:
currentdb.QueryDefs("Query1").Properties("Description")

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
>I have a query that prints out a list of database objects. I would like to
>add the property description that is visible in the object list pane. Does
[quoted text clipped - 20 lines]
> thank you in advance,
> Claudette Hennessy
Claudette Hennessy - 08 Feb 2007 22:15 GMT
OK, this code returns the values for the queries and tables, but,
Function GetDescription(ObjectName As String, ObjectType As String)
Dim db As Database
Set db = CurrentDb()
If ObjectType = "Query" Then GetDescription =
CurrentDb.QueryDefs(ObjectName).Properties("Description")
If ObjectType = "Table" Then GetDescription =
CurrentDb.TableDefs(ObjectName).Properties("Description")
**********************************************************************************
What is the syntax to get the descriptions out of the Forms and Reports
Containers?
???If ObjectType = "Forms" Then GetDescription =
db.Containers("Forms").Properties.Name.("Descriptions")???
*************************************************************************************
End Function
> Hi,
> not sure, that you can get description using SQL, you can use VBA, here
[quoted text clipped - 26 lines]
>> thank you in advance,
>> Claudette Hennessy
George Nicholson - 13 Feb 2007 18:05 GMT
CurrentDb.Containers("Forms").Documents(ObjectName).Properties("Description")
HTH,
> OK, this code returns the values for the queries and tables, but,
>
[quoted text clipped - 44 lines]
>>> thank you in advance,
>>> Claudette Hennessy