I have a created a crosstab feeder query that joins my tables together, then created a cross table query that is used by a crosstab report. My problem is that my totals are incorrect and I cannot even figure out where the value being displayed is coming from. Please help!
Feeder Query:
SELECT Department.DepartmentName, ProjectType.ProjectTypeAbbrev, Time.WorkDate, Time.Hours, [LastName] & ", " & [FirstName] AS FullName, Employee.EmployeeNumber
FROM ProjectType INNER JOIN (Department INNER JOIN (Employee INNER JOIN (Project INNER JOIN [Time] ON Project.ProjectID = Time.ProjectID) ON Employee.EmployeeID = Time.EmployeeID) ON Department.DepartmentID = Employee.DepartmentID) ON ProjectType.ProjectTypeID = Project.ProjectTypeID
WHERE (((ProjectType.ProjectTypeAbbrev) Is Not Null) AND ((Time.WorkDate) Between [Forms]![PayrollPrompt]![DtPeriodStarting] And [Forms]![PayrollPrompt]![DtPeriodEnding]));
Crosstab Query:
PARAMETERS [Forms]![PayrollPrompt]![DtPeriodStarting] DateTime, [Forms]![PayrollPrompt]![DtPeriodEnding] DateTime;
TRANSFORM Sum(PayrollFeederQuery.Hours) AS SumOfHours
SELECT PayrollFeederQuery.DepartmentName, PayrollFeederQuery.EmployeeNumber, PayrollFeederQuery.FullName, Sum(PayrollFeederQuery.Hours) AS TotalHours
FROM PayrollFeederQuery
GROUP BY PayrollFeederQuery.DepartmentName, PayrollFeederQuery.EmployeeNumber, PayrollFeederQuery.FullName
PIVOT PayrollFeederQuery.ProjectTypeAbbrev In ("REG","OVT","HDY","VCN","JRY","BRE","STD","SEV");
Thanks!
Kim
Feeder Query:
SELECT Department.DepartmentName, ProjectType.ProjectTypeAbbrev, Time.WorkDate, Time.Hours, [LastName] & ", " & [FirstName] AS FullName, Employee.EmployeeNumber
FROM ProjectType INNER JOIN (Department INNER JOIN (Employee INNER JOIN (Project INNER JOIN [Time] ON Project.ProjectID = Time.ProjectID) ON Employee.EmployeeID = Time.EmployeeID) ON Department.DepartmentID = Employee.DepartmentID) ON ProjectType.ProjectTypeID = Project.ProjectTypeID
WHERE (((ProjectType.ProjectTypeAbbrev) Is Not Null) AND ((Time.WorkDate) Between [Forms]![PayrollPrompt]![DtPeriodStarting] And [Forms]![PayrollPrompt]![DtPeriodEnding]));
Crosstab Query:
PARAMETERS [Forms]![PayrollPrompt]![DtPeriodStarting] DateTime, [Forms]![PayrollPrompt]![DtPeriodEnding] DateTime;
TRANSFORM Sum(PayrollFeederQuery.Hours) AS SumOfHours
SELECT PayrollFeederQuery.DepartmentName, PayrollFeederQuery.EmployeeNumber, PayrollFeederQuery.FullName, Sum(PayrollFeederQuery.Hours) AS TotalHours
FROM PayrollFeederQuery
GROUP BY PayrollFeederQuery.DepartmentName, PayrollFeederQuery.EmployeeNumber, PayrollFeederQuery.FullName
PIVOT PayrollFeederQuery.ProjectTypeAbbrev In ("REG","OVT","HDY","VCN","JRY","BRE","STD","SEV");
Thanks!
Kim