Avatar of Sean HF
Sean HF

asked on 

too few parameters , expected 3

Hi, I get the below error msg when i try to run a macro, and idea how to sort this out? Thanks S.
too few parameters , expected 3
sub xxx()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim stsq As String

Set db = CurrentDb
stsq = "SELECT [CRC].[Revenue] FROM [CRC] " & _
        "WHERE ((([CRC].[Project Number])="A") and (([CRC].[TaskNumber])="B") " & _
        "and (([CRC].[Account])="C") and (([CRC].[Revenue])<>0))"
Set rst = db.OpenRecordset(stsq, dbOpenDynaset)

rst([Revenue]) = 999
end sub
Microsoft Access

Avatar of undefined
Last Comment
Ryan Chong

8/22/2022 - Mon