J
John B. Smotherman
I'm using the database.openrecordset method, passing either a query name or
SQL code as the Name parameter and not specifying a parameter for Type,
Options or LockEdit, which are all optional. Here's a short example that
works:
dim db as DAO.Database
dim rst as DAO.RecordSet
set db = Currentdb()
set rst = db.OpenRecordset ( "qryTaskTimeline" )
'processing results here
'blah blah blah
rst.close
db.close
I use similar code in several subs or functions and it all works just fine,
but in the latest function I get an error 3061 "Too few parameters. Expected
3."
I tried putting a breakpoint immediately before the db.OpenRecordset and
manually executing the query, just to check. No problem there, so I close the
query, switch back to the VBA window and step over the db.openrecordset and
still get the error... Anyone have an idea?
Thanks!
SQL code as the Name parameter and not specifying a parameter for Type,
Options or LockEdit, which are all optional. Here's a short example that
works:
dim db as DAO.Database
dim rst as DAO.RecordSet
set db = Currentdb()
set rst = db.OpenRecordset ( "qryTaskTimeline" )
'processing results here
'blah blah blah
rst.close
db.close
I use similar code in several subs or functions and it all works just fine,
but in the latest function I get an error 3061 "Too few parameters. Expected
3."
I tried putting a breakpoint immediately before the db.OpenRecordset and
manually executing the query, just to check. No problem there, so I close the
query, switch back to the VBA window and step over the db.openrecordset and
still get the error... Anyone have an idea?
Thanks!