A
AngiW
I have a query that is supposed to update the number of years someone has
worked according to their hire date. It used to work great until one day it
decided to stop updating. Nothing has been edited so I can't figure out the
problem unless it's all of the sudden a syntax error, but I can't find it.
Hopefully someone on here can! This is driving me crazy! TIA! FYI: Hire Date
is, obviously, a date and TimeWorked is set to number (single).
UPDATE [Employee Main] INNER JOIN [Accrual Main] ON [Employee Main].[Employee
ID] = [Accrual Main].employeeID
SET [Accrual Main].TimeWorked = DateDiff("yyyy",[Employee Main]![Hire
date],Now())+Int(Format(Now(),"mmdd")<Format([Employee Main]![Hire
date],"mmdd"));
worked according to their hire date. It used to work great until one day it
decided to stop updating. Nothing has been edited so I can't figure out the
problem unless it's all of the sudden a syntax error, but I can't find it.
Hopefully someone on here can! This is driving me crazy! TIA! FYI: Hire Date
is, obviously, a date and TimeWorked is set to number (single).
UPDATE [Employee Main] INNER JOIN [Accrual Main] ON [Employee Main].[Employee
ID] = [Accrual Main].employeeID
SET [Accrual Main].TimeWorked = DateDiff("yyyy",[Employee Main]![Hire
date],Now())+Int(Format(Now(),"mmdd")<Format([Employee Main]![Hire
date],"mmdd"));