M
Mark Seaborn
So I have lines in my code.
Dim curDatabase As DAO.Database
Dim rs As DAO.Recordset
Dim oQuery As QueryDef
Set curDatabase = CurrentDb
Set oQuery = curDatabase.QueryDefs("Query-ProjectAssignmentTreeCtrl")
Set rs = oQuery.OpenRecordset(dbOpenSnapshot, dbReadOnly, dbReadOnly)
I have checked with the debugger and I have a valid QueryDef Object
(oQuery). The last line of code causes an error that says "Too few
Parameters: Expected 1". I have tried all combinations of the optional
parameters to the OpenRecordset function using a QueryDef. Am I just doing
something stupid here?
Dim curDatabase As DAO.Database
Dim rs As DAO.Recordset
Dim oQuery As QueryDef
Set curDatabase = CurrentDb
Set oQuery = curDatabase.QueryDefs("Query-ProjectAssignmentTreeCtrl")
Set rs = oQuery.OpenRecordset(dbOpenSnapshot, dbReadOnly, dbReadOnly)
I have checked with the debugger and I have a valid QueryDef Object
(oQuery). The last line of code causes an error that says "Too few
Parameters: Expected 1". I have tried all combinations of the optional
parameters to the OpenRecordset function using a QueryDef. Am I just doing
something stupid here?