I am trying to assign the result of the query into the variable. I have one query (lets call it "Query1") that will check various criteria. I tried it as follows.
Dim rst As DAO.Recordset
Dim strSQL As String
Dim Variable1 As String
strQry = "Query1"
Set rst = CurrentDb.OpenRecordset(strQry)
Variable1 = ?????
rst.Close
Set rst = Nothing
I need help to complete the above code so that my variable will get the value returned by the query. Please note that my Query1 will either return a Null value or a single record.
strSQLandstrQry