Showing properties of a QueryDef

  • Thread starter Thread starter Ian Millward
  • Start date Start date
I

Ian Millward

I want to Debug.Print the names and descriptions of all the queries in my
QueryDefs Collection but I can't find a way to surface the Descriptions
property. I am able to set it in the 'Query Properties' Dialog from the
Design View but it doesn't form part of the Properties set of a QueryDef.

Any ideas?

Ian Millward
Edinburgh
 
Try:
CurrentDb().QueryDefs("MyQuery").Properties("Description")

If the query has no description, you may get the description for a table in
the query, or you may get Error 3270.
 
Alan,

No, It doesn't work. It will only show the properties which are in the
QueryDef.Properties list. I thought it might have been in the MSysObjects
Table but that only has the name of the query.

Thanks anyway,

Ian Millward
 
Ian, it works here, but Access does not create the Description property
until it is used, so you have to error-trap the case where there is no
Description.
 

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

Back
Top