Results 1 to 3 of 3
  1. #1
    agyapong isaac is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2012
    Posts
    1

    quary addition subtraction

    On my form, I have:
    Name, Date of transaction, Debt, Credit, balance
    If John pays $100 on the date 21/01/2012 and withdraws $60 on the 25/01/2012 and pay $25.50 and $80 on the 01/02/2012 and 13/02/2012 and on the 13/02/2012 withdrawn $10.
    I would like query table or a report to display something like this




    Name Date of transaction Debt Credit Balance
    John 21/01/2012 $100.00 $100.00
    John 25/01/2012 $60 $40.00
    John 01/02/2012 $25.50 $65.50
    John 13/02/2012 $80.00 $145.50
    John 13/02/2012 $10 $135.50

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    A running balance like that is not easy to do in query or on form. Textbox on report has a RunningSum property that does make this easy on a report. Create a textbox on report with expression in ControlSource: =Nz([Credit])-Nz([Debit]). Set the RunningSum property to OverAll.
    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
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You might look at "Rogers Access Library". There is an example of a running sum in a query.

    RunningSumInQuery.mdb (beginner)
    http://www.rogersaccesslibrary.com/forum/topic279.html

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

Similar Threads

  1. Subtraction of Two Fields
    By shafi_sunshine in forum Queries
    Replies: 5
    Last Post: 12-09-2012, 07:01 AM
  2. Replies: 7
    Last Post: 12-06-2012, 03:10 PM
  3. Basic Subtraction in Access
    By akrasodomski in forum Access
    Replies: 11
    Last Post: 04-18-2012, 03:33 PM
  4. date subtraction in query
    By mejia.j88 in forum Queries
    Replies: 1
    Last Post: 03-29-2012, 02:28 PM
  5. subtraction between records
    By JJCHCK in forum Programming
    Replies: 5
    Last Post: 10-11-2011, 12:57 AM

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