counting checkboxes

legendv

Registered User.
Local time
Today, 21:59
Joined
Mar 18, 2002
Messages
99
Does anyone know how to count checkboxes on a report? If I use the basic
=count([checkbox]) it counts all checkboxes whether they are checked or not. Is there a way to count only the checked ones?
 
Make a hidden field =IIF([Chkbox]= -1,1,0). Then sum that field.
 
Sum(Iif([MyField]=True,1,0))
 
I put the code in the footer but receive an error, does anyone know how that is possible?
 
I have used the following in an unbound text box in a report;
=Sum(Abs([mycheckboxfield]))

MartijnAn did you put Rich's suggestion in the Report footer or page footer?
In the report footer it will add up all the true's and if you create a footer based on one of your fields it will add up the true's on each page. Well, it does in my reports. Don't think it works in the page footer.
 
AN60 said:
I have used the following in an unbound text box in a report;
=Sum(Abs([mycheckboxfield]))

MartijnAn did you put Rich's suggestion in the Report footer or page footer?
In the report footer it will add up all the true's and if you create a footer based on one of your fields it will add up the true's on each page. Well, it does in my reports. Don't think it works in the page footer.
It put the code in the page AND form footer (sorry I forgot to mention forms)
 
Rich..

Thank you just what I was looking for... The only thing I had to change was to add the " = " sign infront of the Sum..

Thanks again
R~
 

Users who are viewing this thread

Back
Top Bottom