I have about 30 queries saved that I need to execute and put in a new database. I've already got code to loop through a list of all my queries but I can not figure out how to execute and put the resulting table in a new database.
This is my current code.
This is my current code.
Code:
Public Sub ExportReportQueries()
Dim Qry As QueryDef
For Each Qry In CurrentDb.QueryDefs
If Right(Qry.NAME, Len("REPORT QUERY")) = "REPORT QUERY" Then
' I dunno what to do here! :(
End If
Next
Set db = Nothing
End Sub