Solved

How do I count the number of checked boxes on a report?

Posted on 2008-06-23
5
182 Views
Last Modified: 2013-11-28
Hi there.  I need to count the number of cases with a checked box for a particular field on a report attached to the table, but am not sure how to do this - have had a look elsewhere on EE but can only seem to find how to do this on a form in a live sense, which I don't need to do - I just need a count to appear on the report.  Any idea how I do that?  
0
Comment
Question by:fernandoweb
  • 3
5 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 250 total points
ID: 21846617
In Access, True is -1 and False is 0, so if you add up the values of all the check boxes you will get a minus # of checked boxes.

If you need this in a footer on the report, =Abs(Count(YourCheckBoxField))
0
 

Author Comment

by:fernandoweb
ID: 21846753
Thanks for that, although for some reason all that seems to give me is the total number of checkboxes (ie - 60, and there are 60 clients on the system) as opposed to the number which are checked (which is just 4)

Sorry too this question seems to have partially ended up in the C# programming category which wasn't intended...!
0
 
LVL 28

Expert Comment

by:omgang
ID: 21849119
I think jimhorn meant to say
=Abs(Sum(YourCheckBoxField))

OM Gang

PS - I don't want the points - typo on jim's part
0
 

Author Comment

by:fernandoweb
ID: 21854049
Thanks for that - works great now
0
 

Author Closing Comment

by:fernandoweb
ID: 31469747
Thanks very much
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question