Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

856 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