This is what I used. Where would I place your critiera? I'm Trying to find
the accrual rate based off of Service Years & Hours. At this time I using
Org. Hire Date to find this. I need to actual use Service Years & Hours ie.
12yrs + 150hrs to find it but I don't know how to go about that as once the
hours hit 1957.50 it needs to add a year ie. 12 yrs 1957.50 then becomes 13
yrs and each month there is an accrual added to it of Workdays in a month *
7.5 (haven't figured out that yet)
SELECT [tblEmp Hire Info].*, tblNEAccruals.[Monthly Rate], [tblEmployee
Demographic Info].[Current Employee], [tblEmp Hire Info].[Hiring Status]
FROM tblNEAccruals, [tblEmployee Demographic Info] INNER JOIN [tblEmp Hire
Info] ON [tblEmployee Demographic Info].[SS# ID] = [tblEmp Hire Info].[SS# ID]
WHERE ((([tblEmployee Demographic Info].[Current Employee])=Yes) AND
(([tblEmp Hire Info].[Hiring Status])="NE") AND ((DateDiff("yyyy",[tblEmp
Hire Info].[Isac Original Hire Date],Date()))>=[tblNEAccruals].[From] And
(DateDiff("yyyy",[tblEmp Hire Info].[Isac Original Hire
Date],Date()))<[tblNEAccruals].[To]));
John W. Vinson said:
Thanks I set up the table as shown. However I really can't understand how he
explains the query.
This is what I need it to do. I want the query to look at the employees
Service Years and based on that Return the Rate using the Range
From To Rate
0 2.99 7.5
3 5.99 9.5
So If I am at 4 years it will return 9.5
You can include the range table in your query with *no* join line; put a
criterion on From of
<= [Service Years]
and a criterion on To lf
If (as you should be!) you're calculating the service years with an expression
on the service start date, use that calculation in the criterion.