VBA to save a Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Office 2003 on Windows XP. Is it possible to create a stored
procedure (or saved query) using ADO? If so, can someone please post example
code?

If not, can someone please post example DAO code to do it?

Thanks a lot.
 
Something like:

Dim qdfExport As QueryDef

Dim strActive_SQL as String

Dim Db as Database



strActive_SQL = "SELECT * FROM YourTable "

Set db = CurrentDB

Set qdfExport = DB.CreateQueryDef("YourQueryName", strActive_SQL)





Kevin C
 

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

Similar Threads


Back
Top