R
Ricter
That is the error I'm getting for my anniversary dates query. The SQL:
SELECT LastName, FirstName, HireDate, IIF(DateSerial(Year(Date() + 1,
Month(HireDate), Day(HireDate)) < Date() + 365, Year(Date() + 365) –
Year(HireDate), Year(Date()) – Year(HireDate))
AS YearsOfService
FROM tblEmployees
WHERE (DateSerial(Year(Date()), Month(HireDate), Day(HireDate))
BETWEEN Date() AND Date()) + 365 OR (DateSerial(Year(Date()) + 1,
Month(HireDate), Day(HireDate)) <= Date() + 365;
There is a selection area over the first minus sign in the SQL after I close
the error window, if that's helpful.
SELECT LastName, FirstName, HireDate, IIF(DateSerial(Year(Date() + 1,
Month(HireDate), Day(HireDate)) < Date() + 365, Year(Date() + 365) –
Year(HireDate), Year(Date()) – Year(HireDate))
AS YearsOfService
FROM tblEmployees
WHERE (DateSerial(Year(Date()), Month(HireDate), Day(HireDate))
BETWEEN Date() AND Date()) + 365 OR (DateSerial(Year(Date()) + 1,
Month(HireDate), Day(HireDate)) <= Date() + 365;
There is a selection area over the first minus sign in the SQL after I close
the error window, if that's helpful.