Results 1 to 4 of 4
  1. #1
    nightangel73 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2014
    Posts
    45

    adding up totals in query

    Here is my dilema



    I want to calculate total of sample withdrawn and returned


    I built a query with that has the sum of withdrawn and sum of returned

    well as long as it one record it works fine

    Problem is when I go and do another withdrawn or returned transaction

    then the sum of withdrawn doubles because it is now two transactions

    if I add another withdrawal transaction the it sums three times and so on..

    I want that it sums the total of withdrawn and total returned but I don't see how to get it right.


    it goes 1st transaction received 300
    2nd transaction withdrawal 50
    3rd transaction withdrawal 25

    because it is 3 entries it goes 50 +50+50, 25+25+25 I want result to be total withdrawn 75.

    Please help I need to get this right!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    What is the data structure? Are multiple tables involved?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    nightangel73 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2014
    Posts
    45
    Quote Originally Posted by June7 View Post
    What is the data structure? Are multiple tables involved?
    yes Product-order-order details.

    the order details stores received quantity, withdrawn quantity and returned quantity

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    So received, withdrawn, returned data are all in one table? Does each have its own field or do you have a field for transaction type and then a field for quantity? This is the structure I need explained.

    Post the query you attempted.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Adding "Count" Totals to Report
    By Ludovik in forum Reports
    Replies: 7
    Last Post: 11-02-2013, 01:09 PM
  2. Replies: 1
    Last Post: 08-06-2013, 07:52 PM
  3. Replies: 3
    Last Post: 04-19-2013, 02:57 PM
  4. Adding totals to a form from a subform
    By Niki in forum Access
    Replies: 13
    Last Post: 05-13-2011, 12:17 AM
  5. Adding Totals to a query using queryDef
    By jrickels in forum Programming
    Replies: 7
    Last Post: 04-06-2010, 07:47 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