I have a datawarehouse application that updates "linked tables" into
MS-Access, so users can make SQL queries using MS-Access as a Proxy.
In deploying some Cognos applications, I would like to take a selection
of MS-Access queries and export the SQL statements into a file.
This way, I can go to the "production" environment and deploy my SQL
code there. The datawarehouse already has the option of updating linked
tables.
If I package the .mdb file itself, I need to do a lot of work in
cleaning it up first (remove all linked tables), remove unnecessary
queries, whereas the "production system" has other queries and tables
already in it -- not really an option.
Any help?
-Alex
[MVP] S.Clark - 09 Nov 2005 17:32 GMT
Using VBA, you can extract the SQL property from each of the desired
querydefs.
See the help file for QueryDefs for some sample code.

Signature
Steve Clark, Access MVP
http://www.fmsinc.com/consulting
>I have a datawarehouse application that updates "linked tables" into
> MS-Access, so users can make SQL queries using MS-Access as a Proxy.
[quoted text clipped - 14 lines]
>
> -Alex