I can't seem to get the second SQL statement to work, access says "too few parameters, expected 1."
set rs2 = is the line I am not getting right.
all variables are set in the code above where I copied and pasted, rs and rs2 are declared as dao.recordsets
and sql and sqltime are declared as strings
set rs2 = is the line I am not getting right.
all variables are set in the code above where I copied and pasted, rs and rs2 are declared as dao.recordsets
and sql and sqltime are declared as strings
Code:
Set rs = CurrentDb.OpenRecordset(SQL)
rs.MoveFirst
employeeid = rs("EmpID")
sqltime = "SELECT * FROM tblTimeClock WHERE EmpID = employeeid"
Set rs2 = CurrentDb.OpenRecordset(sqltime)
Last edited: