pass through queries .sql property

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

Rick Brandt

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

Bill Crist

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


.
 

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