Solved

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

Posted on 2008-06-23
5
180 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

777 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