I tried both of these expressions to get a 0 when there are no
records...neither works. Any suggestions?
=NZ(DCount([SalesID],"UnPaidChxQ"),0)
Text10=NZ(DCount([SalesID],"UnPaidChxQ"),0)
Thanks
DS
Klatuu - 29 Jul 2005 19:09 GMT
I'm not sure what you are trying to do. They way your code is structured,
the only time you will get 0 is when there are no records in the table at
all. You don't have criteria defined.
> I tried both of these expressions to get a 0 when there are no
> records...neither works. Any suggestions?
[quoted text clipped - 4 lines]
> Thanks
> DS
DS - 29 Jul 2005 20:01 GMT
> I'm not sure what you are trying to do. They way your code is structured,
> the only time you will get 0 is when there are no records in the table at
[quoted text clipped - 8 lines]
>>Thanks
>>DS
Thats it, Whenever I don't hae any records I want a Zero.
Thanx
DS
Marshall Barton - 29 Jul 2005 19:17 GMT
>I tried both of these expressions to get a 0 when there are no
>records...neither works. Any suggestions?
>
>=NZ(DCount([SalesID],"UnPaidChxQ"),0)
>Text10=NZ(DCount([SalesID],"UnPaidChxQ"),0)
There must be something else going on. I always get a zero
when there are no records. Whatever it is, I can't see it
in your posted expression.
Note that the Nz is unnecessary with DCount.

Signature
Marsh
MVP [MS Access]
DS - 29 Jul 2005 20:03 GMT
>>I tried both of these expressions to get a 0 when there are no
>>records...neither works. Any suggestions?
[quoted text clipped - 7 lines]
>
> Note that the Nz is unnecessary with DCount.
Thanks, I changed my Query around and that worked. It was an incorrect
join.
Once again everyone, Thank You!
DS
Jörg Ackermann - 29 Jul 2005 19:20 GMT
Hi,
DS schreibselte:
> I tried both of these expressions to get a 0 when there are no
> records...neither works. Any suggestions?
[quoted text clipped - 4 lines]
> Thanks
> DS
Try:
=DCount("*","UnPaidChxQ")
or
DCount("SalesID","UnPaidChxQ")
Acki
DS - 29 Jul 2005 20:03 GMT
> Hi,
> DS schreibselte:
[quoted text clipped - 17 lines]
>
> Acki
Thanks, see previous post.
DS