I create a module function to run a query.
************************
Dim Db As Database
Dim RST As Recordset
Set Db = CurrentDb
Set RST = Db.OpenRecordset("qryTEST", dbOpenDynaset)
**********************
the query 'qryTEST' has a parameter, like
select * from account
where accountID = Forms!Form1!txtAccountID
I run the function through Clicking a button on the form.
GET error:
Too few Parameters. Expected 1 pointing to the line
Set RST = Db.OpenRecordset("qryTEST", dbOpenDynaset)
How to correct this error?
************************
Dim Db As Database
Dim RST As Recordset
Set Db = CurrentDb
Set RST = Db.OpenRecordset("qryTEST", dbOpenDynaset)
**********************
the query 'qryTEST' has a parameter, like
select * from account
where accountID = Forms!Form1!txtAccountID
I run the function through Clicking a button on the form.
GET error:
Too few Parameters. Expected 1 pointing to the line
Set RST = Db.OpenRecordset("qryTEST", dbOpenDynaset)
How to correct this error?