I have been trying to figure this one out all afternoon and I'm getting nowhere fast. I am running Access 2010 and I am trying to create a crosstab query that will populate a form. I have a table of employee names with their corresponding group name. I also have a table that lists all the job processes that the TMs could perform in their groups. Finally I have a table that stores Observation Audits that are performed on the employees by their supervisor on the job processes. I want to create a dynamic crosstab query that shows the following:
I need to have dynamic column headings that change based on which group is audited as each group has different jobs. As well I need to show all employees in each group not just the ones who have been audited.
Now I have created a query which gives me all processes but only the employees who have been audited, and the column headings are not dynamic:
based on qryAllSortScore:
But I can't figure out how to get dynamic headings -- all the references I have found show using dates as dynamic headings, but that's not what I need. Also, how can I show all employees and not just those who have been audited.... or is this too complex? Any help /direction would be appreciated. Thank you.
Code:
Employe Name Process1 Process2 Process3 ......
J. Doe 100%
B. Smith 90%
D. Chan 100% 75%
I need to have dynamic column headings that change based on which group is audited as each group has different jobs. As well I need to show all employees in each group not just the ones who have been audited.
Now I have created a query which gives me all processes but only the employees who have been audited, and the column headings are not dynamic:
Code:
PARAMETERS [Forms]![frmSecurity]![GroupName] Text ( 255 );
TRANSFORM Avg(qryAllSortScore.AvgScore) AS AvgOfAvgScore
SELECT qryAllSortScore.EmpName
FROM qryAllSortScore
GROUP BY qryAllSortScore.EMpName
PIVOT qryAllSortScore.qryProcessCC.Process;
based on qryAllSortScore:
Code:
SELECT qryScoreSort.GroupName, qryProcessCC.Process, qryScoreSort.AvgScore
FROM qryScoreSort RIGHT JOIN qryProcessCC ON qryScoreSort.Process = qryProcessCC.Process
ORDER BY qryScoreSort.AvgScore;
But I can't figure out how to get dynamic headings -- all the references I have found show using dates as dynamic headings, but that's not what I need. Also, how can I show all employees and not just those who have been audited.... or is this too complex? Any help /direction would be appreciated. Thank you.