Read/Write to the "Description" property of an object (Query)

P

prhood

I would like to access (Read/Write) the "Description" property of a
query as displayed in the query list. I would use this property to fill a
list box with appropriate queries which the user can access.

I would appreciate any guidance that is available. I have checked various
lists but can find nothing similar to what is outlined above.
 
T

ti976

assess thru querydefs collection:
ex:

currentdb.querydefs("NAME OF QUERY").properties("description").value
or
currentdb.querydefs(INTEGERVALUE).properties(INTEGERVALUE).value
[I think the integer value for description is 21]

you can iterate thru collection using count prop of querydef:

for i = 0 to (currentdb.querydefs.count - 1)
debug.print currentdb.querydefs(i).properties(21).value
next i

to be explicit: instrad of dumping the desc value into the debug
screen, select what ever appropriate mechanism you need.
I'm using AC2002; I believe in AC97, the description property is not
created by default so an error may result - which you can catch and
disregard.
 
Top