BvCF
MIS
- Nov 11, 2006
- 92
Have the following crosstab query sql script;
TRANSFORM Count(qryEmpAccountStatus.AcctNo) AS CountOfAcctNo
SELECT Employees.Username, Count(qryEmpAccountStatus.AcctNo) AS NumAcctsAssigned
FROM Employees INNER JOIN qryEmpAccountStatus ON Employees.Employee_ID = qryEmpAccountStatus.AssignedTo
GROUP BY Employees.Username
PIVOT qryEmpAccountStatus.StatusCode;
This results in the following display:
Username----NumAcctsAssigned-----<>------Open
Jill--------23-------------------21------2
John--------15-------------------5-------10
The column titled "<>" is those accounts that have not been worked. Question 1 - How do I include the column heading "NotWorked" in the query results? Note, the various values for the StatusCode are "NotWorked", "Open", "Pending", and "Closed." In essence, when an account is assigned, the status of that assignment will be one of the four status codes.
Question 2 - How do I display the results of this cross-tab query within a listbox so that the Manager can receive a real-time look at the status of the employees' workload?
Thank you.
TRANSFORM Count(qryEmpAccountStatus.AcctNo) AS CountOfAcctNo
SELECT Employees.Username, Count(qryEmpAccountStatus.AcctNo) AS NumAcctsAssigned
FROM Employees INNER JOIN qryEmpAccountStatus ON Employees.Employee_ID = qryEmpAccountStatus.AssignedTo
GROUP BY Employees.Username
PIVOT qryEmpAccountStatus.StatusCode;
This results in the following display:
Username----NumAcctsAssigned-----<>------Open
Jill--------23-------------------21------2
John--------15-------------------5-------10
The column titled "<>" is those accounts that have not been worked. Question 1 - How do I include the column heading "NotWorked" in the query results? Note, the various values for the StatusCode are "NotWorked", "Open", "Pending", and "Closed." In essence, when an account is assigned, the status of that assignment will be one of the four status codes.
Question 2 - How do I display the results of this cross-tab query within a listbox so that the Manager can receive a real-time look at the status of the employees' workload?
Thank you.