I am trying to run this update query through vba and when it goes to run it gives me the error "Object invalid or no longer set" yet when I copy the code and push it through the sql query window it works fine?
Any Ideas?
Here's the update query;
Many thanks in advance
Any Ideas?
Here's the update query;
Code:
dbs.Execute ("UPDATE tbl_CapexStaff SET tbl_CapexStaff.Status = '" & Status_Update & "'" _
& " WHERE (((tbl_CapexStaff.CAP_ID)= " & CAP_Staff & ") AND ((tbl_CapexStaff.Employee_no)=" & emp_LIVE & "));")
Many thanks in advance