Setting Query Description property

  • Thread starter Thread starter paxdak
  • Start date Start date
P

paxdak

How do you set the Query Description property?

I'm creating a query in VBA, and I'd like to set the description property
to keep things straight.
The User Help wasn't too helpful. I'm trying the following code:

Dim db As Database
Dim qdf As QueryDef

Set db = CurrentDb

'More stuff here to create strSQL

Set qdf = db.CreateQueryDef("qry_Name", strSQL)
db.QueryDefs("qry_Name").Description = "My Description"


The code creates the query correctly, I just can't get the description
filled in.
 
I think you have to add property named Description
something like this:

Set prp = qdf.CreateProperty("Description", dbtext, "My
Description")
qdf.Properties.Append prp ' Append to collection.

Check online help for more info
 
Back
Top