Trevor G
Registered User.
- Local time
- Today, 08:06
- Joined
- Oct 1, 2009
- Messages
- 2,361
The following code will list all the query names, but I want to list only the select query type or if possible as an alternative list the query names and what type of queries they are.
Reason a lot of queries that have to be edited but need to do the select queries first.
Reason a lot of queries that have to be edited but need to do the select queries first.
Function dmwListAllQueries() As String
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim strMsg As String
Dim qry As AccessObject, dB As Object
On Error GoTo Error_Handler
Set dB = Application.CurrentData
For Each qry In dB.AllQueries
Debug.Print qry.Name
Next qry
strMsg = " -- Queries listing complete -- "
Procedure_Done:
dmwListAllQueries = strMsg
Exit Function
Error_Handler:
strMsg = Err.Number & " " & Err.Description
Resume Procedure_Done
End Function