Setting Query Description property

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.
 
A

Alex Dybenko

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
 

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

Top