Getting a null value to display zero in count query

  • Thread starter Thread starter kahaymon
  • Start date Start date
K

kahaymon

How can I get this query to yield a zero when the count of the field "ID" is
zero?

SELECT [QRY IP Falls U parameter].[Unit location of incident], [QRY IP Falls
U parameter].Shift, Count([QRY IP Falls U parameter].ID) AS [2005 Falls]
FROM [QRY IP Falls U parameter]
WHERE ((([QRY IP Falls U parameter].[Date of incident]) Between #1/1/2005#
And #12/31/2005#))
GROUP BY [QRY IP Falls U parameter].[Unit location of incident], [QRY IP
Falls U parameter].Shift;


Thanks.
 
Nz(COUNT([QRY IP Falls U parameter].ID), 0)

instead of

Count([QRY IP Falls U parameter].ID)



Vanderghast, Access MVP
 
Back
Top