i have saved query by name "QUERY_SELECT_ALL". which contains sql like "
Select * from Tablename".
Like this i have thousand queries saved.
Now i want to get all 1000 queries SQL into a text file.
How can i get it
You will need some understanding of VBA code to implement this.
A rudimentary example follows:
Function DumpQueries() As String
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Const strcFile = "C:\MyQueries.txt"
Open strcFile For Output As #1
Set db = CurrentDb
For Each qdf In db.QueryDefs
If Not qdf.Name Like "~*" Then
Print #1, qdf.Name & ": " & Trim$(Replace(qdf.SQL, vbCrLf, " "))
End If
Next
Close #1
Set qdf = Nothing
Set db = Nothing
DumpQueries = strcFile
End Function

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> i have saved query by name "QUERY_SELECT_ALL". which contains sql like "
> Select * from Tablename".
[quoted text clipped - 17 lines]
>> > How can i export all saved queries sql into a text file or an excel
>> > file.