Results 1 to 2 of 2
  1. #1
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147

    Code to add Yes and N/A's

    I am trying to add the Yeses and N/A's in a query from my table. I have tried to count, sum and Sum(Abs and I can not get them to add up correctly. All it is doing is adding the total count in the column. I also need to add the No's separately from the others. Thanks!

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    are they a text field? if so, we'll assume the field name is called "reply" and the table is named "myTable"

    SELECT Count(myTable.reply)
    FROM myTable
    WHERE myTable.reply = "yes" OR myTable.reply = "N/A"

    for the No you would do:
    SELECT Count(myTable.reply)
    FROM myTable
    WHERE myTable.reply = "no"

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

Similar Threads

  1. Word code in Access - How to modify my current code
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 11-15-2010, 08:26 AM
  2. Code in combobox, code in text box
    By float in forum Forms
    Replies: 3
    Last Post: 09-29-2010, 07:12 AM
  3. Need code
    By Patience in forum Access
    Replies: 8
    Last Post: 07-01-2010, 07:26 AM
  4. Access 2003 code vs Access 2007 Code
    By ralphjramirez in forum Access
    Replies: 5
    Last Post: 11-23-2009, 12:33 PM
  5. Need Help Getting to Code
    By Snuffles in forum Programming
    Replies: 8
    Last Post: 04-22-2008, 05:25 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