P
Peter Marshall
I have used similar VBA code below without problems, but now I am getting a "Run-time error 3061: Too few parameters. Expected 2." Debug stops on the "Set rst = " statement. Can anyone help me with this?
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("qryTimesInOutCheck", dbOpenSnapshot)
If rst.RecordCount = 0 Then
vbResponse = MsgBox("Record not found", vbOKOnly)
Else
vbResponse = MsgBox("Record found", vbOKOnly)
End If
rst.Close
Set rst = Nothing
Set db = Nothing
End If
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("qryTimesInOutCheck", dbOpenSnapshot)
If rst.RecordCount = 0 Then
vbResponse = MsgBox("Record not found", vbOKOnly)
Else
vbResponse = MsgBox("Record found", vbOKOnly)
End If
rst.Close
Set rst = Nothing
Set db = Nothing
End If