Hi people,
I'm using the following code to generate a list of the reports I want for a combo box:
This grabs the queries for the reports I want to generate on my form through the combo box.
However, the name of the report, is taken from the name of the query I use to generate the report, e.g.
Report: rptSale has query name = qryRptSales.
I want to keep the names as they are for consistency in my naming conventions for the database and to avoid programming problems with spaces in db object names.
I thought I could use the Description field of the query. So I right mouse clicked on my query, then went to Properties, and under Description, wrote a nicely formatted name for the query ("My Sales Report").
I was hoping to call that Description field through VBA. But it doesn't seem to be an option when I try to reference the
variable I setup.
Is it possible to call the Description of a Database Object (in this case a query) through VBA?
Thanks in advance.
I'm using the following code to generate a list of the reports I want for a combo box:
Code:
For Each accObjectQry In CurrentData.AllQueries
Me.cboSelectReport.AddItem accObjectQry.name
Next
This grabs the queries for the reports I want to generate on my form through the combo box.
However, the name of the report, is taken from the name of the query I use to generate the report, e.g.
Report: rptSale has query name = qryRptSales.
I want to keep the names as they are for consistency in my naming conventions for the database and to avoid programming problems with spaces in db object names.
I thought I could use the Description field of the query. So I right mouse clicked on my query, then went to Properties, and under Description, wrote a nicely formatted name for the query ("My Sales Report").
I was hoping to call that Description field through VBA. But it doesn't seem to be an option when I try to reference the
Code:
Dim accObjectQry As Access.AccessObject
Is it possible to call the Description of a Database Object (in this case a query) through VBA?
Thanks in advance.