how to get the content of my existing query?

X

xpengi

a new question is, how to get the content of my existing query, like th
content of "query1" is
"select * from...", i want to sign it to a string.

for example,
...
dim strQuery as string

Me.RecordSource = "Query1"

strQuery = content of "Query1" <-- i don't know how to get it
.....


really thank
 
A

Allen Browne

Examine the SQL property of the QueryDef:

strQuery = CurrentDb.QueryDefs("Query1").SQL
 
Top