As Remou says, you cannot get it from the request (but you can include a function that returns it in the request). Here is another function:
Public Function GetTableDescr(stTableName As String) As String On Error Resume Next GetTableDescr = CurrentDb.TableDefs(stTableName).Properties("Description").Value End Function
Here is a query that returns all non-system tables, indicating their dates and descriptions (using the function above):
SELECT MSysObjects.Name, msysobjects.datecreate, msysobjects.dateupdate, GetTableDescr([Name]) AS Description FROM MSysObjects WHERE (((MSysObjects.Name) Not Like "~*") AND((MSysObjects.Name) Not Like "MSys*") and ((MSysObjects.Type)=1));
Finally, you can make an almost identical function for queries. The trick I found is that you return only the inherited descriptions, otherwise if the request has no description, you will get a description of the requested object:
Public Function GetQueryDescr(stQryName As String) As String On Error Resume Next If CurrentDb.QueryDefs(stQryName).Properties("Description").Inherited = False Then GetQueryDescr = CurrentDb.QueryDefs(stQryName).Properties("Description").Value End If End Function
On Error Resume Next
necessary, because until the object has a description, the property is null.
source share