S
Secret Squirrel
I have a query that shows the number of years of service by employee. I want
to be able to look up based on the years of service and have it also show the
vacation accrual amount that is in my tblAccruals. Here is my current query:
SELECT tblEmployees.ID, qryVacationUsed.HoursCount AS VacationDaysUsed,
DateDiff("yyyy",[StartDate],Date()) AS YearsAccrued,
([YearsAccrued]-[VacationDaysUsed]) AS VacationAvailable
FROM tblEmployees LEFT JOIN qryVacationUsed ON tblEmployees.ID =
qryVacationUsed.EmpID;
My table accruals is as follows:
AccrualID
AccrualDays
AccrualYearsStart
AccrualYearsEnd
What I want it to do is see if the years of service is between the
AccrualYearsStart and AccrualYearsEnd and then have it show the AccrualDays
for that employee.
to be able to look up based on the years of service and have it also show the
vacation accrual amount that is in my tblAccruals. Here is my current query:
SELECT tblEmployees.ID, qryVacationUsed.HoursCount AS VacationDaysUsed,
DateDiff("yyyy",[StartDate],Date()) AS YearsAccrued,
([YearsAccrued]-[VacationDaysUsed]) AS VacationAvailable
FROM tblEmployees LEFT JOIN qryVacationUsed ON tblEmployees.ID =
qryVacationUsed.EmpID;
My table accruals is as follows:
AccrualID
AccrualDays
AccrualYearsStart
AccrualYearsEnd
What I want it to do is see if the years of service is between the
AccrualYearsStart and AccrualYearsEnd and then have it show the AccrualDays
for that employee.