Results 1 to 3 of 3
  1. #1
    lazylamb is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2017
    Posts
    1

    Help on Run-On Calculation

    Hello.
    I’m new to this and trying to look for some guidance.

    I have a query (query 1) that sum up my total value.

    Click image for larger version. 

Name:	query1.GIF 
Views:	12 
Size:	2.4 KB 
ID:	31076

    I want to create a query (Run on) that starts off with my SumofValue ($1000.00) from query 1. And then total another value from query 2 (Trans_Total) to give my first Run-On Total. After that, my first Run-On Total ($950.00) will be my start_Value for the next day (01/20/2015). And will total the next day Trans_Total to give me the 2nd Run-On total.



    Click image for larger version. 

Name:	query2.GIF 
Views:	12 
Size:	6.9 KB 
ID:	31077

    Is this something possible in a query? Looking for any suggestions on how to approach this calculation. Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This is a common topic. Have you done any research on running total/sum/balance?

    In query is difficult. Easy with report. Use textbox RunningSum property.

    Will have to pull in the SumOfValue result from Query1 into a textbox (call it tbxSV), suggest putting in header section. Couple options. One is a Cartesian relationship query that includes query1 and query2 so the $1000 shows on every record. Another is to use DLookup() expression in query or textbox or even DSum() on the raw dataset. Be aware either approach can perform slowly with very large datasets. Then bind a textbox (call it tbxTT) to Trans_Total field and set RunningSum property to "OverAll". Can hide textboxes if you want. In another textbox expression: =[tbxTT] + [tbxSV]
    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
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    what is the rational for query1? does it represent a month or other time period? or some other basis? And is it based on the same table as the second query?

    Also can you have more than one transaction on any given day?

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

Similar Threads

  1. mpg calculation
    By papavictorlima in forum Queries
    Replies: 3
    Last Post: 02-02-2016, 02:46 PM
  2. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  3. Calculation
    By Maggie in forum General Chat
    Replies: 2
    Last Post: 10-16-2011, 12:49 PM
  4. How to do calculation???
    By latestgood in forum Forms
    Replies: 0
    Last Post: 05-18-2011, 11:11 AM
  5. Calculation Help
    By ErnieS in forum Access
    Replies: 13
    Last Post: 07-08-2010, 08:35 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