View Full Version : Count Function


bill crumpton
12-30-2000, 05:22 PM
I am trying to count a field on a form if that field contains a certain word. For example, I want to count how many active cases I have. The fiel called [casetype] contains the word "active", "inactive" and so forth. I am using the =count([casetype])="active" but it doesn't work. Any help?


BAC

R. Hicks
12-30-2000, 05:50 PM
Bill I would try using the DCount() function for this:

=DCount("casetype","YourTableName","([casetype] = 'Active')")

(change "YourTableName" to the name of you table, it must be within quotes)

HTH
RDH

bill crumpton
12-30-2000, 06:13 PM
Thanks RD Hicks. It worked.


BAC

josephyeo
12-31-2000, 12:14 AM
See also, the reply to my query under subject Count()

bill crumpton
01-02-2001, 04:43 AM
RD Hicks suggestion worked, however when I include date range criteria the dcount() function just shows #Error in the unbound text field and in the status bar at the bottom it shows Calculating . . .
Any reason why I cannot have the DCount() function is affected by date range criteria?


Thanks.

BAC

[This message has been edited by bill crumpton (edited 01-02-2001).]