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.
Set QueryDef = Object.CreateQueryDef("qryName", "sqltext")
Dim dbsNorthwind As Database
Dim qdfNew As QueryDef
Set dbsNorthwind = CurrentDb()
With dbsNorthwind
' Create permanent QueryDef.
Set qdfNew = .CreateQueryDef("qryName", "SELECT lkupAVCConnection.ID FROM lkupAVCConnection;")
' Open Recordset and print report.
GetrstTemp qdfNew
.Close
End With
Function GetrstTemp(qdfTemp As QueryDef)
Dim rsttemp As Recordset
With qdfTemp
Debug.Print .Name
Debug.Print " " & .sql
Set rsttemp = .OpenRecordset(dbOpenDynaset)
Do While Not rsttemp.EOF
Debug.Print rsttemp(0) ', rsttemp(1), rsttemp(2), rsttemp(3), rsttemp(4)
rsttemp.MoveNext
Loop
With rsttemp
.MoveLast
Debug.Print "number of records = " & .RecordCount
.Close
End With
End With
End Function