Results 1 to 8 of 8
  1. #1
    Kennertoy is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    29

    Yes/No Check Counting in Query

    Hello,



    I have been struggling with a problem and still cannot find a solution. I have a form that has people's name, address, phone number, etc., AND approx 40 yes/no field options. Each person could have none, 1,2,15, or 20 checked for a yes (I assume no check is a no - db is null).

    I want to report the people that have chosen more than one YES and their individual totals. When I use a query I can find all the people in the db that have chosen one activity with no problem using the criteria YES. But when I include multitude of activities and ctiteria yes in the query, it only finds people with those yes's that I checked for yes's. Someone suggested to use 'GoupBy' but I haven't had any luck. Each check has the format Acroynm then the work Check i.e. CH Check, or CMSC Check, and so on. The label associated with the check are, Text Lbl, BB Lbl, etc.

    I exported the table to Excel, used and coutif function and got totals with everything from zeros to 20, then Excel would not data sort to get the data. It found the total of the yes's and of course the no's being zero. Access should do it easier.

    I hope I have explained it OK. Thanks for your time.

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    I am a little bit confused with your situation. What are your trying to total. The total yeses per person (record). The total yeses per item (field) Try to give us a real life example. It is very hard to follow your explanation. Perhaps an example of the data you have and what the expected results would look like.

  3. #3
    Kennertoy is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    29
    thanks Alandisman
    Each record (person) has 40 or so activities (event) that we can check yes as a participant. I want to total each person's total of
    YES checks. I thought I'd have to use a query to do this.

  4. #4
    Kennertoy is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    29
    Sorry for the misspelling - Alansidman,

    Could I send you part of the table?

    Kennertoy.

  5. #5
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    First, a check box has a numerical value of "-1'. An unchecked box has a value of "0". If you prepare a query and in a new field type:

    NewFieldName: (field1 + field2 + field3 + .........)*-1 should give you the total of all the Yeses for each record.

    Look at the attached db for an example
    Attached Files Attached Files

  6. #6
    Kennertoy is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    29
    AlanSidman
    Thanks for input.

    Well I tried various combinations of your recommendation but still no luck. Can I send you my data base, to let you see my problem?

  7. #7
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Upload to this web site. Go to advanced and upload it. Be sure to run a compact and repair before uploading.

  8. #8
    Kennertoy is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    29
    AlanSidman,

    Thank you for your help - I have finally done it!!!!!!!! I am a little thick sometimes, but I finally solved it with
    your instructions. Thank you. Now if I can mark this thread complete I will get back to the data base and work on
    more changes. Thanks again.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Counting Text Fields in a Query
    By TimMoffy in forum Queries
    Replies: 2
    Last Post: 05-14-2012, 08:00 AM
  2. Counting in Query
    By EdwinLawrence in forum Queries
    Replies: 3
    Last Post: 03-05-2012, 12:21 PM
  3. Help with counting Query
    By metalhead22 in forum Queries
    Replies: 8
    Last Post: 04-29-2009, 02:07 AM
  4. Counting returned records in a query
    By johncob in forum Queries
    Replies: 0
    Last Post: 02-11-2009, 05:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums