L
Linda RQ
Hi Everyone,
My Goal is to show a sum of USTOPoints for each employee for the last 90
days. If an employee has 5 points total for a 90 day period, we need to
start a
discipline process.
Using Access 2003. I have a query that I'll put into a report, the sql is
below but I use the query grid to create my queries so please let me know
what I have to add that way. My problem is that I need a sum of the
USTOPoints for the last 90 days from the most recent date of USTODate for
each employee not just 90 days from today. Can this be done as a group
report? My Tables and Query are below. If I'm on the wrong track and there
is a better way to do this, let me know...........Thanks, Linda
UnscheduledTimeOffID
EmployeeID_fk
USTOTypesID_fk
USTODate
UnscheduledTimeOffTypesID
USTODescription
USTOPoints
FandLName
Name
strEmployeeID
SELECT tblUnscheduledTimeOff.USTODate,
tblUnscheduledTimeOff.UnscheduledTimeOffID,
tblUnscheduledTimeOff.EmployeeID_fk, tblUnscheduledTimeOff.USTOTypesID_fk,
tblUnscheduledTimeOffTypes.USTOPoints,
tblUnscheduledTimeOffTypes.USTODescription, qryDepartmentEmployees.Name
FROM (tblUnscheduledTimeOffTypes INNER JOIN tblUnscheduledTimeOff ON
tblUnscheduledTimeOffTypes.UnscheduledTimeOffTypesID =
tblUnscheduledTimeOff.USTOTypesID_fk) INNER JOIN qryDepartmentEmployees ON
tblUnscheduledTimeOff.EmployeeID_fk = qryDepartmentEmployees.strEmployeeID;
My Goal is to show a sum of USTOPoints for each employee for the last 90
days. If an employee has 5 points total for a 90 day period, we need to
start a
discipline process.
Using Access 2003. I have a query that I'll put into a report, the sql is
below but I use the query grid to create my queries so please let me know
what I have to add that way. My problem is that I need a sum of the
USTOPoints for the last 90 days from the most recent date of USTODate for
each employee not just 90 days from today. Can this be done as a group
report? My Tables and Query are below. If I'm on the wrong track and there
is a better way to do this, let me know...........Thanks, Linda
UnscheduledTimeOffID
EmployeeID_fk
USTOTypesID_fk
USTODate
UnscheduledTimeOffTypesID
USTODescription
USTOPoints
FandLName
Name
strEmployeeID
SELECT tblUnscheduledTimeOff.USTODate,
tblUnscheduledTimeOff.UnscheduledTimeOffID,
tblUnscheduledTimeOff.EmployeeID_fk, tblUnscheduledTimeOff.USTOTypesID_fk,
tblUnscheduledTimeOffTypes.USTOPoints,
tblUnscheduledTimeOffTypes.USTODescription, qryDepartmentEmployees.Name
FROM (tblUnscheduledTimeOffTypes INNER JOIN tblUnscheduledTimeOff ON
tblUnscheduledTimeOffTypes.UnscheduledTimeOffTypesID =
tblUnscheduledTimeOff.USTOTypesID_fk) INNER JOIN qryDepartmentEmployees ON
tblUnscheduledTimeOff.EmployeeID_fk = qryDepartmentEmployees.strEmployeeID;