G
Guest
I have a crosstab query I use to show the counts of escalation types. The
data is returned like this
Open Date 1st Escalation 2nd Escalation
4/1/06 10 5
4/2/06 8 3
4/3/06 12 6
I need the data to show like this
Escalation Type 4/1 4/2 4/3
1st Escalation 10 8 12
2nd Escalation 5 3 6
Here is my sql
PARAMETERS [Forms]![frmEscReportsa]![Dstart] DateTime,
[Forms]![frmEscReportsa]![DEnd] DateTime;
TRANSFORM Count(tblTemp.[1st or 2nd Time]) AS [CountOf1st or 2nd Time]
SELECT tblTemp.[Open Date]
FROM tblTemp
WHERE (((tblTemp.[Open Date])>([Forms]![frmEscReportsa]![Dstart]-1) And
(tblTemp.[Open Date])<([forms]![frmEscReportsa]![DEnd]+1) And (tblTemp.[Open
Date]) Not Like "0") AND ((tblTemp.TL) Is Not Null) AND ((tblTemp.Status)
Like
IIf([forms]![frmEscReportsa]![cbxStat]="Combined","*",[forms]![frmEscReportsa]![cbxStat])))
GROUP BY tblTemp.[Open Date]
PIVOT tblTemp.[1st or 2nd Time] In ("1st Escalation","2nd Escalation");
Thanks for your help.
data is returned like this
Open Date 1st Escalation 2nd Escalation
4/1/06 10 5
4/2/06 8 3
4/3/06 12 6
I need the data to show like this
Escalation Type 4/1 4/2 4/3
1st Escalation 10 8 12
2nd Escalation 5 3 6
Here is my sql
PARAMETERS [Forms]![frmEscReportsa]![Dstart] DateTime,
[Forms]![frmEscReportsa]![DEnd] DateTime;
TRANSFORM Count(tblTemp.[1st or 2nd Time]) AS [CountOf1st or 2nd Time]
SELECT tblTemp.[Open Date]
FROM tblTemp
WHERE (((tblTemp.[Open Date])>([Forms]![frmEscReportsa]![Dstart]-1) And
(tblTemp.[Open Date])<([forms]![frmEscReportsa]![DEnd]+1) And (tblTemp.[Open
Date]) Not Like "0") AND ((tblTemp.TL) Is Not Null) AND ((tblTemp.Status)
Like
IIf([forms]![frmEscReportsa]![cbxStat]="Combined","*",[forms]![frmEscReportsa]![cbxStat])))
GROUP BY tblTemp.[Open Date]
PIVOT tblTemp.[1st or 2nd Time] In ("1st Escalation","2nd Escalation");
Thanks for your help.