G
Guest
For a timesheet application, I have the following query which crosstabulates
the hours worked by each project manager by project:
TRANSFORM Sum(TimeRecords.Hours) AS SumOfHours
SELECT TimeRecords.ProjectNumber, Projects.Project
FROM (TimeRecords INNER JOIN Staff ON TimeRecords.StaffID = Staff.StaffID)
INNER JOIN Projects ON TimeRecords.ProjectNumber = Projects.ProjectNumber
WHERE (((TimeRecords.Status)=2) AND ((Len([TimeRecords].[ProjectNumber]))>1))
GROUP BY TimeRecords.ProjectNumber, Projects.Project
PIVOT Staff.Initials;
This currently displays something like:
ProjectNumber Project CD FF JF KS
SF
-----------------------------------------------------------------------------------
06123 Hershey Cancer Center 5 18
06125 Museum of Art 15 15 20
06351 Free Library
25
I would like to add an additional column that sums the multiple of each
project manager's hours multiplied by their Billing Rate. I do not want to
hardcode either their rate nor our current array of project managers.
I thought a Pivot Table form would be able to handle it, but it seems cludgy
and doesn't seem to permit what I'm after. Does anyone have any ideas?
the hours worked by each project manager by project:
TRANSFORM Sum(TimeRecords.Hours) AS SumOfHours
SELECT TimeRecords.ProjectNumber, Projects.Project
FROM (TimeRecords INNER JOIN Staff ON TimeRecords.StaffID = Staff.StaffID)
INNER JOIN Projects ON TimeRecords.ProjectNumber = Projects.ProjectNumber
WHERE (((TimeRecords.Status)=2) AND ((Len([TimeRecords].[ProjectNumber]))>1))
GROUP BY TimeRecords.ProjectNumber, Projects.Project
PIVOT Staff.Initials;
This currently displays something like:
ProjectNumber Project CD FF JF KS
SF
-----------------------------------------------------------------------------------
06123 Hershey Cancer Center 5 18
06125 Museum of Art 15 15 20
06351 Free Library
25
I would like to add an additional column that sums the multiple of each
project manager's hours multiplied by their Billing Rate. I do not want to
hardcode either their rate nor our current array of project managers.
I thought a Pivot Table form would be able to handle it, but it seems cludgy
and doesn't seem to permit what I'm after. Does anyone have any ideas?