P
palazo3
I must be having a brainfart...for the life of me, I can't figure what
I am doing wrong here:
I want to run a query and have the total number of records returned
stored in a variable.
Dim db As Database
Dim rs As Recordset
Dim totalcount As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("Select count(*) as x from
qryServiceALLqb WHERE [TYPEREC?] = 'HA'")
totalcount = rs!x
MsgBox mcount
The error I keep getting is too few parameters. Expected 2.
Runtime Error: 3061
Any suggestions?
I am doing wrong here:
I want to run a query and have the total number of records returned
stored in a variable.
Dim db As Database
Dim rs As Recordset
Dim totalcount As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("Select count(*) as x from
qryServiceALLqb WHERE [TYPEREC?] = 'HA'")
totalcount = rs!x
MsgBox mcount
The error I keep getting is too few parameters. Expected 2.
Runtime Error: 3061
Any suggestions?