carlosatcfs
New member
- Local time
- Today, 22:35
- Joined
- May 14, 2008
- Messages
- 1
Hi, have been working on this one for 2 days and getting nowhere, have searched forums, books etc but still no joy.
I have the crosstab query below in Access 2000 which returns some Null values. For graphical representation these need to be zeros. I have tried various incarnations of the Nz function using the Nz(datasource,0) format, for example:
"TRANSFORM Nz(Count(IIf([Number] Is Null,0,[Number])),0) AS [Incident Count]"
but I always get an error message saying:
"Wrong number of arguments used with function in query expression"
I also found a NullToZero function on the web which I imported into my DB, but it always returns network connectivity errors
I've attached a screendump of the design view of the query and the resulting table. Please help.
TRANSFORM Count(IIf([Number] Is Null,0,[Number])) AS [Incident Count]
SELECT QryNewData2.[Pass/Fail]
FROM (QryNewData2 INNER JOIN QryDatesWithYearPeriod ON QryNewData2.RespTimeShort = QryDatesWithYearPeriod.Date) INNER JOIN QryPeriodHistoryMasterByRow2 ON QryDatesWithYearPeriod.YearPeriod = QryPeriodHistoryMasterByRow2.YearPeriod
WHERE (((QryNewData2.[Pass/Fail])="Pass" Or (QryNewData2.[Pass/Fail])="Fail"))
GROUP BY QryNewData2.[Pass/Fail]
ORDER BY QryDatesWithYearPeriod.YearPeriod DESC
PIVOT QryDatesWithYearPeriod.YearPeriod;
I have the crosstab query below in Access 2000 which returns some Null values. For graphical representation these need to be zeros. I have tried various incarnations of the Nz function using the Nz(datasource,0) format, for example:
"TRANSFORM Nz(Count(IIf([Number] Is Null,0,[Number])),0) AS [Incident Count]"
but I always get an error message saying:
"Wrong number of arguments used with function in query expression"
I also found a NullToZero function on the web which I imported into my DB, but it always returns network connectivity errors
I've attached a screendump of the design view of the query and the resulting table. Please help.
TRANSFORM Count(IIf([Number] Is Null,0,[Number])) AS [Incident Count]
SELECT QryNewData2.[Pass/Fail]
FROM (QryNewData2 INNER JOIN QryDatesWithYearPeriod ON QryNewData2.RespTimeShort = QryDatesWithYearPeriod.Date) INNER JOIN QryPeriodHistoryMasterByRow2 ON QryDatesWithYearPeriod.YearPeriod = QryPeriodHistoryMasterByRow2.YearPeriod
WHERE (((QryNewData2.[Pass/Fail])="Pass" Or (QryNewData2.[Pass/Fail])="Fail"))
GROUP BY QryNewData2.[Pass/Fail]
ORDER BY QryDatesWithYearPeriod.YearPeriod DESC
PIVOT QryDatesWithYearPeriod.YearPeriod;