I'm trying to count missing dates in the [CalDue] field of the table tblCal.
It seems that the following code should work but it always yields a zero
count.
DCount("[CalDue]", "tblCal", "IsNull([CalDue])")

Signature
Thank you,
Del
Douglas J. Steele - 05 Mar 2008 18:30 GMT
From the Help file:
"The DCount function doesn't count records that contain Null values in the
field referenced by expr, unless expr is the asterisk (*) wildcard
character. If you use an asterisk, the DCount function calculates the total
number of records, including those that contain Null fields."
Try:
DCount("*", "tblCal", "IsNull([CalDue])")

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> I'm trying to count missing dates in the [CalDue] field of the table
> tblCal.
> It seems that the following code should work but it always yields a zero
> count.
>
> DCount("[CalDue]", "tblCal", "IsNull([CalDue])")
fredg - 05 Mar 2008 18:35 GMT
> I'm trying to count missing dates in the [CalDue] field of the table tblCal.
> It seems that the following code should work but it always yields a zero
> count.
>
> DCount("[CalDue]", "tblCal", "IsNull([CalDue])")
[CalDue] is the name of a Date datatype field?
Try it this way:
=DCount("*","tblCal","IsNull([CalDue])")
or
=DCount("*","tblCal","[CalDue] is Null")

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Marshall Barton - 05 Mar 2008 18:38 GMT
>I'm trying to count missing dates in the [CalDue] field of the table tblCal.
>It seems that the following code should work but it always yields a zero
>count.
>
>DCount("[CalDue]", "tblCal", "IsNull([CalDue])")
DCount("*", "tblCal", "CalDue Is Null")

Signature
Marsh
MVP [MS Access]
Del - 05 Mar 2008 19:26 GMT
Thanks to all,

Signature
Thank you,
Del
> I'm trying to count missing dates in the [CalDue] field of the table tblCal.
> It seems that the following code should work but it always yields a zero
> count.
>
> DCount("[CalDue]", "tblCal", "IsNull([CalDue])")