Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Sub insertQueryNames()
Dim aQueryNames() As String
Dim varName As Variant
Dim strSql As String
aQueryNames = Split(getQueryNames, ";")
DoCmd.SetWarnings (False)
For Each varName In aQueryNames
strSql = "INSERT INTO tblQryNames ( strQryName ) SELECT '" & varName & "' As strQryName"
'Debug.Print strSql
DoCmd.RunSQL strSql
Next varName
DoCmd.SetWarnings (True)
End Sub
Public Function getQueryNames() As String
Dim strNames As String
Dim qryDef As DAO.QueryDef
For Each qryDef In CurrentDb.QueryDefs
'Debug.Print qryDef.Name
If Not Left(qryDef.Name, 1) = "~" Then
strNames = strNames & qryDef.Name & ";"
End If
Next qryDef
If Len(strNames) > 0 Then
strNames = Left(strNames, Len(strNames) - 1)
End If
getQueryNames = strNames
End Function