Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2011
    Posts
    413

    Unanswered: Count Number of Yes/No

    Is their a way to count the number of Yes (s) when using a yes/no check box ?
    I mean if the check box is check then I want the count to be on and add up accordingly. How would I go about doing this and where would you suggest I put the answer, in an unbound textbox ? I would want this action to be performed on my form so should I put the code on the current event property ?

    Thanks,,,

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    An Unbound Textbox is the right choice, with the ControlSource (found at Properties - Data) set to

    Code:
    = DCount("*", "YourTableOrQueryName", "[YourCheckboxName] = - 1")


    Replacing YourTableOrQueryName with the name of the Table or Query the Field that is Bound to your Checkbox resides in, and YourCheckboxName with the name of that Field.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Nov 2011
    Posts
    413
    Thanks, I appreciate it. Access is so much fun.Wish I had learned it way back when my brain worked a little.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    It is, indeed, fun! Which is why, although in forced retirement, I still work in it, and spend eight or ten hours a day gallivanting through here and three or four other Access forums, trying to help out! And after 15 years of Access, I still learn something new every day!

    Good luck with your project!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •