You didn't mention which Windows MDAC version you have. This script will print out the SQL statements for saved queries in your database, if your MDAC version supports DAO 3.6
Option Explicit
Dim dbe
Dim db
Dim qdf
Set dbe = CreateObject("DAO.DBEngine.36")
'change the next line to include the full path to your database
Set db = dbe.OpenDatabase("C:\SomeFolder\YourDatabase.mdb")
For Each qdf In db.QueryDefs
If Left(qdf.Name,1) <> "~" Then
Wscript.StdOut.WriteLine qdf.Name
Wscript.StdOut.WriteLine qdf.SQL
Wscript.StdOut.WriteLine String(20, "-")
End If
Next
Set db = Nothing
Set dbe = Nothing
I saved it as DumpQuerySQL.vbs, then ran it from a command prompt like this:
cscript DumpQuerySQL.vbs > querySQL.txt