Trying to load a query in Access 2003 as a recordset, returns error 3061, too few parameters, Expected 1.
Dim StrSQL As String
Dim rs As DAO.Recordset
Dim db As DAO.Database
StrSQL = "<some_SQL_Stat ement>"
Set db = CurrentDb()
Set rs = db.OpenRecordse t(StrSQL, dbOpenSnapshot)
also tried loading a query table as follows with the same results:-
Set rs = db.OpenRecordse t("My Query Table", dbOpenSnapshot)
I can load "My Query Table" using the same SQL statements via the standard Access environment OK.
Dim StrSQL As String
Dim rs As DAO.Recordset
Dim db As DAO.Database
StrSQL = "<some_SQL_Stat ement>"
Set db = CurrentDb()
Set rs = db.OpenRecordse t(StrSQL, dbOpenSnapshot)
also tried loading a query table as follows with the same results:-
Set rs = db.OpenRecordse t("My Query Table", dbOpenSnapshot)
I can load "My Query Table" using the same SQL statements via the standard Access environment OK.
Comment