Criteria in a DCount Function

  • Thread starter Thread starter Del
  • Start date Start date
D

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])")
 
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])")
 
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")
 
Del said:
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")
 
Back
Top