1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Counting Checkboxes in Access Report

Discussion in 'Business Applications' started by irosen516, Jan 28, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. irosen516

    irosen516 Thread Starter

    Joined:
    Dec 9, 2002
    Messages:
    23
    Hi. Lets say that i have a table that contains check boxes. My report lists all the checkboxes, and down in the page footer, I want to have a text box that counts the number of checked boxes. My checkbox name is called checkbox and i've tried many variations of =Sum and =Count and can't seem to get it to work. My textbox always ends up showing =Error when I run the report. Any suggestions?

    Thanks.
     
  2. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    Have you tried this variation?

    =Sum(Iif([checkbox]=True;1;0))

    The problem with this is that you probably want a total just for the page in question. Access doesn't do this without a little more complexity than you might expect, but it does do it. This article from MS shows you how it works:

    ACC2000: How to Create Page Totals on a Report
     
  3. irosen516

    irosen516 Thread Starter

    Joined:
    Dec 9, 2002
    Messages:
    23
    When I try to paste your formula =Sum(Iif([checkbox]=True;1;0))
    into a textbox in the page footer, I get an error message saying invalid syntax and it won't let me click off of the box. Any other suggestions?
     
  4. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    Oh sorry. That's because of my Euro-formatting. Usually I catch that...

    Try this:

    =Sum(Iif([checkbox]=True,1,0))
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Counting Checkboxes Access
  1. dpic44
    Replies:
    7
    Views:
    426
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/115733

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice