strSQL = qdef.QueryDef possible?

  • Thread starter Thread starter mcnews
  • Start date Start date
M

mcnews

is it possible to get the sql definition of a defined query stored in
a string?
i need users to be able to design there queries with GUI, but i also
need to be able to modify what they have with VBA.

thanks,
mcnews
 
A QueryDef has a SQL property:

Dim qdf As QueryDef
Set qdf = dbEngine(0)(0).QueryDefs("MyQuery")
strSQL = qdf.SQL
Set qdf = Nothing
 
Back
Top