Because it's already in Access, you need to run the query there, not in your code ... something like this
Dim Qry As QueryDef
Set Qry = db.QueryDefs(az)
Qry("ParameterName" = "123"
Set rs = qdf.OpenRecordset(dbOpenDynaset)
The Execute statement doesn't return recordsets. It is intended for running SQL that doesn't return anything like "Delete", "Update", etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.