View Full Version : DCount Function


DaniBoy
01-29-2002, 12:31 PM
Hello
I have a report made from a query called ResponseDetail where I have 6 fields that the report uses. 2 of the fields are dates and 4 are checkboxes. The name of the query is ResponseDetail and one of the checkbox name is "Bulk" I need to tell access to only count de records on the checkbox that are true. This is what I did and it gives me errors;
=DCount("[Bulk]","ResponseDetail","[Bulk] = -1'")

Rich
01-29-2002, 12:36 PM
Sum(Iif([Bulk] = True,1,0))

DaniBoy
01-29-2002, 12:42 PM
Thanks Rich

It works when I use it on the detail section, but I want to be able to use it on the page header. When I put it there the data is an error. Any more ideas?
Thanks
DaniBoy

DaniBoy
01-29-2002, 01:35 PM
Anyone else has any idea how to do the above?!!
Thanks

AccessPhantom
01-29-2002, 06:37 PM
Place unbound textbox in the page header.
Set the control source to the textbox containing the result from the detail section (from the formula suggested by Rich).

Phantom