pass through queries .sql property

  • Thread starter Thread starter Bill Crist
  • Start date Start date
B

Bill Crist

How do I reference a saved pass through query's .sql
property? I'd like to build a "base" query which coul d
have its where clause edited programatically before
submission to the server. I need to be able to retrieve
the bae sql from a saved pass through and then
prgramatically rebuild it from selections in a form's
controls.
 
Bill Crist said:
How do I reference a saved pass through query's .sql
property? I'd like to build a "base" query which coul d
have its where clause edited programatically before
submission to the server. I need to be able to retrieve
the bae sql from a saved pass through and then
prgramatically rebuild it from selections in a form's
controls.

roughly...

Dim MyDB as Database
Dim MyQryDef as QueryDef
Dim BaseSQL as String

Set MyDB = CurrentDB
Set MyQryDef = MyDB.QueryDefs("YourQueryName")

BaseSQL = MyQryDef.SQL

yada yada...
 
Thanks, worked great
-----Original Message-----


roughly...

Dim MyDB as Database
Dim MyQryDef as QueryDef
Dim BaseSQL as String

Set MyDB = CurrentDB
Set MyQryDef = MyDB.QueryDefs("YourQueryName")

BaseSQL = MyQryDef.SQL

yada yada...


.
 
Back
Top