I am trying to use the following statement to count records:
However, when my field [facility] is null, the count comes back as "0", even though there are many fields that have no facility. When this is the case, I want it to count the records for which the [facility] field is null. How can I do this? Can I combine Iif & DCount? Something like this....
However, when I do this, I get:
=DCount("[ID]","master","[facility] = [txtFacility]")
However, when my field [facility] is null, the count comes back as "0", even though there are many fields that have no facility. When this is the case, I want it to count the records for which the [facility] field is null. How can I do this? Can I combine Iif & DCount? Something like this....
=Iif (IsNull[facility], DCount("[ID]","master","IsNull[facility]"), DCount("[ID]","master","[facility] = [txtFacility]"))
However, when I do this, I get:
What is the correct way to handle this?You may have entered an operand without an operator.