Results 1 to 3 of 3
  1. #1
    pjd71's Avatar
    pjd71 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Apr 2013
    Location
    Sunset Beach, NC
    Posts
    15

    Somewhat Difficult (or at least for me) Sum

    Still getting back into the Access world since I retired from the Marine Corps. I have built a database for purchase requests for medical equipment for the VA (current employer). I have 1 table and 1 query that I have made a report for. I have the report grouped by [Cost Code] and sum up the [TOT of REQ] (total dollar amount) by [Approved] (Yes or No), using this expression: =Sum(IIf([Approved]=-1,[Tot of REQ],0)), which works with no issues. Some of these requests have been purchased and the cost was sometimes greater that what was requested. I made a field called [Final Cost of PO] (total amount of the purchase).



    What I want to do is have the sum of the group reflect [Approved] [TOT of ReQ] without calculating if there is a dollar value in the [Final Cost of PO].

    Any help would greatly be appreciated.

    Thanks,
    Patrick

  2. #2
    pjd71's Avatar
    pjd71 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Apr 2013
    Location
    Sunset Beach, NC
    Posts
    15
    I added a simple "AND" in and it worked. I also tested to make sure.

    =Sum(IIf([Funded]=-1 AND [Final Cost of PO]=00,[Tot of REQ],0))

  3. #3
    Parsonshere is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2012
    Location
    Rusk
    Posts
    25
    Might try something like this:=Sum(IIf([Approved]=-1 AND IsNull([Final Cost of PO]),[Tot of REQ],0)) Best way is to create an update query though.

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

Similar Threads

  1. Difficult Query!
    By pastormcnabb in forum Queries
    Replies: 2
    Last Post: 04-09-2013, 09:40 PM
  2. difficult query
    By methis in forum Queries
    Replies: 2
    Last Post: 03-18-2013, 02:36 PM
  3. Creating a difficult qry
    By Aubreylc in forum Queries
    Replies: 8
    Last Post: 02-11-2010, 12:13 PM
  4. A Difficult One...(I Think)
    By NickyThorne1 in forum Access
    Replies: 0
    Last Post: 01-31-2009, 07:56 AM
  5. Difficult problem
    By francisca_carv in forum Access
    Replies: 0
    Last Post: 11-19-2008, 05:50 PM

Tags for this Thread

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