S
Stephanie
Hi. I am trying to combine two queries, I think. What I would like to see is
the # of incidents in the current timeframe against the # of incidents in the
previous timeframe. I'm hoping to be able to graph this information in one
graph.
Here's the sql from 1 of the queries:
SELECT IIf([Level]=1,"Level 1",IIf([Level]=0,"Near
Misss",IIf([Level]=4,"Tech (Level 4)","Level 2"))) AS IncidentLevel,
Count(qu_tbFinalIncident_NoLevel4.Level) AS CountOfLevel
FROM qu_tbFinalIncident_NoLevel4
WHERE (((qu_tbFinalIncident_NoLevel4.[Discovery Date]) Between
CVDate([forms]![frquick]![StartDate]) And
CVDate([forms]![frquick]![EndDate])))
GROUP BY IIf([Level]=1,"Level 1",IIf([Level]=0,"Near
Misss",IIf([Level]=4,"Tech (Level 4)","Level 2"))),
qu_tbFinalIncident_NoLevel4.AuthorGroup
HAVING
(((qu_tbFinalIncident_NoLevel4.AuthorGroup)=[Forms]![FrQuick]![Combo82]));
The only difference in the "previous" query is:
[Discovery Date]) Between DateAdd('m',-3,[forms]![frquick]![StartDate]) And
DateSerial(Year([forms]![frquick]![EndDate])
Of course when I combine in a Union query, if get;
Level1 1
Level1 4
level 2 5
Level2 6
which doesn't tell me from which time period each of the levels is from. And
I can't imagine that I would be able to graph this output.
I'd appreciate any suggestions.
Cheers,
Stephanie
the # of incidents in the current timeframe against the # of incidents in the
previous timeframe. I'm hoping to be able to graph this information in one
graph.
Here's the sql from 1 of the queries:
SELECT IIf([Level]=1,"Level 1",IIf([Level]=0,"Near
Misss",IIf([Level]=4,"Tech (Level 4)","Level 2"))) AS IncidentLevel,
Count(qu_tbFinalIncident_NoLevel4.Level) AS CountOfLevel
FROM qu_tbFinalIncident_NoLevel4
WHERE (((qu_tbFinalIncident_NoLevel4.[Discovery Date]) Between
CVDate([forms]![frquick]![StartDate]) And
CVDate([forms]![frquick]![EndDate])))
GROUP BY IIf([Level]=1,"Level 1",IIf([Level]=0,"Near
Misss",IIf([Level]=4,"Tech (Level 4)","Level 2"))),
qu_tbFinalIncident_NoLevel4.AuthorGroup
HAVING
(((qu_tbFinalIncident_NoLevel4.AuthorGroup)=[Forms]![FrQuick]![Combo82]));
The only difference in the "previous" query is:
[Discovery Date]) Between DateAdd('m',-3,[forms]![frquick]![StartDate]) And
DateSerial(Year([forms]![frquick]![EndDate])
Of course when I combine in a Union query, if get;
Level1 1
Level1 4
level 2 5
Level2 6
which doesn't tell me from which time period each of the levels is from. And
I can't imagine that I would be able to graph this output.
I'd appreciate any suggestions.
Cheers,
Stephanie