Results 1 to 6 of 6
  1. #1
    BEstes is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2016
    Location
    California
    Posts
    9

    How to get a total for only one item type in a column...

    Hello,



    I have a report, that lists all active and inactive documents for my company. I need to have a total at the bottom of the report that displays the total for the active documents. There is a column that shows a 1 for active docs and a 2 for inactive docs. No matter what I try, I can't get a total for only the lines with a 1 in this column. Any help I could get with this would be VERY appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    =Sum(IIf(ActiveFieldName = 1, 1, 0))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    BEstes is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2016
    Location
    California
    Posts
    9
    Thanks for your response, whenever I enter that I get this error message.

    Click image for larger version. 

Name:	12345.PNG 
Views:	8 
Size:	9.0 KB 
ID:	24663

    I am entering =Sum(IIf([Status]=1,1,0))

    Now it's just a matter of figuring out what I did wrong on my end.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Is the field text? If so try:

    =Sum(IIf([Status]="1",1,0))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    BEstes is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2016
    Location
    California
    Posts
    9
    That did the trick! Thank you so much!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 12-29-2015, 08:32 AM
  2. Replies: 15
    Last Post: 11-25-2014, 03:42 PM
  3. Replies: 5
    Last Post: 10-15-2014, 01:12 PM
  4. Running Total by Item Number
    By Dave1225 in forum Queries
    Replies: 1
    Last Post: 08-08-2013, 03:15 PM
  5. Replies: 28
    Last Post: 03-13-2012, 07:48 AM

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