A
ablatnik via AccessMonster.com
I have a Work Order database. To date everything works fine until now. I
have 9 Departments and on any given day, they have outstanding work requests
in the system. Until now of course. The department "UEM" they are heating
and air conditioning; anyhow all their work request need to closed prior to
close of the business day.
As long as there is an open or Active work order, the query works. Zero's
show up in the correct fields so long as in at there is a number greater than
zero.
With all the Work Orders closed, I get a blank UEM and a blank UEM report.
I've added the =Count to the UEM report which gives me a zero on my Totals
Report. (The Totals Report is a collection of about 150 queries/reports on
one page).
=Count is not acceptable, it will not give me the sum of all outstanding
orders across the months.
What I need is for the query to return a zero (with counting). The report on
this query will show zero's, and with that the Totals Report, will show a
zero where it needs to be. etc...
Here is the SQL code:
TRANSFORM Nz(Count([Total Active Work Orders By Month for the Year].Status),0)
AS CountOfStatus
SELECT [Total Active Work Orders By Month for the Year].Department, Count(
[Total Active Work Orders By Month for the Year].Status) AS [Total Of Status]
FROM [Total Active Work Orders By Month for the Year]
WHERE ((([Total Active Work Orders By Month for the Year].Department)="UEM"))
GROUP BY [Total Active Work Orders By Month for the Year].Department
PIVOT Format([Date Opened],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun",
"Jul","Aug","Sep","Oct","Nov","Dec");
If someone can help me on this one, much thanks. Even if I have to chance
the other 150 query/ reports.
have 9 Departments and on any given day, they have outstanding work requests
in the system. Until now of course. The department "UEM" they are heating
and air conditioning; anyhow all their work request need to closed prior to
close of the business day.
As long as there is an open or Active work order, the query works. Zero's
show up in the correct fields so long as in at there is a number greater than
zero.
With all the Work Orders closed, I get a blank UEM and a blank UEM report.
I've added the =Count to the UEM report which gives me a zero on my Totals
Report. (The Totals Report is a collection of about 150 queries/reports on
one page).
=Count is not acceptable, it will not give me the sum of all outstanding
orders across the months.
What I need is for the query to return a zero (with counting). The report on
this query will show zero's, and with that the Totals Report, will show a
zero where it needs to be. etc...
Here is the SQL code:
TRANSFORM Nz(Count([Total Active Work Orders By Month for the Year].Status),0)
AS CountOfStatus
SELECT [Total Active Work Orders By Month for the Year].Department, Count(
[Total Active Work Orders By Month for the Year].Status) AS [Total Of Status]
FROM [Total Active Work Orders By Month for the Year]
WHERE ((([Total Active Work Orders By Month for the Year].Department)="UEM"))
GROUP BY [Total Active Work Orders By Month for the Year].Department
PIVOT Format([Date Opened],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun",
"Jul","Aug","Sep","Oct","Nov","Dec");
If someone can help me on this one, much thanks. Even if I have to chance
the other 150 query/ reports.