I didn't paste it all, sorry. But I finally figured out the syntax error. Now I a message saying that I cannot execute a select clause but I need to pull specific records in the recordset. How would I use the select clause or select specific records. I have posted my code below.
Set rstEmployees = db1.OpenRecordset("EmployeeTime", dbOpenDynaset)
db1.Execute "SELECT * FROM EmployeeTime WHERE [EMPLOYEE_NAME] = '" & [EmpName] & "';"
What is the purpose of the SELECT? Are you just trying to specify which records to update? If so, all you need to do is add a WHERE clause to your UPDATE ..
db1.Execute "UPDATE EmployeeTime SET ... & [Total] & "' WHERE [EMPLOYEE_NAME] = '" & [EmpName] & "';"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.