Criteria in a DCount Function

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])")
 
D

Douglas J. Steele

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])")
 
F

fredg

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")
 
M

Marshall Barton

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Dcount (multiple criteria) 3
Access Dcount function in access 0
saving data from a calculation in the control source 3
Access MS Access DCount function problem 0
Dcount operation 2
DCount with Date criteria 2
Problem using Dcount 3
Dcount past time 2

Top