Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Developer Toolkits / February 2007

Tip: Looking for answers? Try searching our database.

Documentation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Claudette Hennessy - 05 Feb 2007 14:28 GMT
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
Alex Dybenko - 05 Feb 2007 16:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.