B
Bob Groger
Hello,
I have a form "timesheets" I am trying to validate data entry in looking for
possible duplicate records. I am trying to open a recordset to see if there
is another table entry with the same employee and date. The simplified code
I am using is:
Dim rst As DAO.Recordset, strEmpID As String
Set rst = CurrentDb.OpenRecordset(" SELECT * FROM timesheet WHERE
me.driver_id = timesheet.driver_id AND me.date = timesheet.date ")
Do Until rst.EOF
The Set rst line returns an error "Too few parameters. Expected:2"
As I understand it, this should return records where the form driver_id and
date = an existing record in the table.
Where am I going wrong here?
Bob Groger
I have a form "timesheets" I am trying to validate data entry in looking for
possible duplicate records. I am trying to open a recordset to see if there
is another table entry with the same employee and date. The simplified code
I am using is:
Dim rst As DAO.Recordset, strEmpID As String
Set rst = CurrentDb.OpenRecordset(" SELECT * FROM timesheet WHERE
me.driver_id = timesheet.driver_id AND me.date = timesheet.date ")
Do Until rst.EOF
The Set rst line returns an error "Too few parameters. Expected:2"
As I understand it, this should return records where the form driver_id and
date = an existing record in the table.
Where am I going wrong here?
Bob Groger