E
Eusi
I have the following code connected to a command button:
Dim al As Double
Let al = 0
Dim dbs As Database, rst As Recordset
Dim strSQL As String
Set dbs = CurrentDb
strSQL = "SELECT [e2a as 2].[AppRef], [e2a as 2].
[need1], [e2a as 2].status " _
& "FROM [e2a as 2] " _
& "WHERE ((([e2a as 2].[need1])='n1'));"
Set rst = dbs.OpenRecordset(strSQL)
rst.MoveLast
Let al = rst.RecordCount
rst.Close
Set dbs = Nothing
MsgBox al
when execution gets to the "set rst.." line, the error
"Run-time error 3061. Too few parameters. Expected 2."
appears. I've checked the knowledge base but can't seem
to find the exact solution.
[e2a as 2] is a query
[need1] is the product of a function
[status] is the product of a function
Any ideas on how to sort this one out?
Thanks in advance!
Eusi
Dim al As Double
Let al = 0
Dim dbs As Database, rst As Recordset
Dim strSQL As String
Set dbs = CurrentDb
strSQL = "SELECT [e2a as 2].[AppRef], [e2a as 2].
[need1], [e2a as 2].status " _
& "FROM [e2a as 2] " _
& "WHERE ((([e2a as 2].[need1])='n1'));"
Set rst = dbs.OpenRecordset(strSQL)
rst.MoveLast
Let al = rst.RecordCount
rst.Close
Set dbs = Nothing
MsgBox al
when execution gets to the "set rst.." line, the error
"Run-time error 3061. Too few parameters. Expected 2."
appears. I've checked the knowledge base but can't seem
to find the exact solution.
[e2a as 2] is a query
[need1] is the product of a function
[status] is the product of a function
Any ideas on how to sort this one out?
Thanks in advance!
Eusi