Results 1 to 7 of 7
  1. #1
    tbjmobile@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    127

    Workaround for calculated control from report to new report

    I have a report which is a monthly account. Does anyone have a trick to get the closing balance, which is obviously calculated so can't be used in an update query, onto the next month's account as a balance brought forward please?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    you don't store calculated values so an update query should be irrelevant

    you could use a union query to union a group by query to sum all transactions up to the opening balance to a query that lists this months transactions. Include in your groupby query the opening balance date as a 'transaction date' so when sorted it will appear at the top

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You can also use a DSum() on the report to sum all transactions prior to the start date of the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    tbjmobile@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    127
    Hello pbaldy,
    I've not used DSum yet. Do you mean place a DSum on the new account to sum the calculated controls on the old account? At the moment I'm making a copy of the current account, renaming it as the new one and running a query to set all the calculated controls to 0 or "" if they are strings. If I'm correct about the above, are you suggesting that I then make 'OpeningBalance' on the new account equal to the DSum?
    Thanks.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You mentioned a report. I'd have a DSum() in the header that got the beginning balance, add/subtract the amounts in the detail, and have a control in the footer that calculated the new ending balance. I'm not sure what you mean by making a copy of the current account. Normally you'd control what account was displayed with criteria.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    tbjmobile@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    127
    Hello again pbaldy,
    What I meant was that in a previous database (Alpha 5) at the end of the month, I would first make a copy Account table once it had completed and had been sent. I would do as you suggest, sum all the in's and out's to get a new starting figure from the new (copied and renamed) account. What I was wondering is, could I have a text box on the new account to DSum those figures from the old one? In actual fact I would only need to sum 'StartingBalance' - 'MonthTotal' I think.

  7. #7
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    You shouldn't be saving new tables per month, just filter your information and sums based on transaction dates and transaction types.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. How to sum a calculated field on a report?
    By Athar Khan in forum Reports
    Replies: 1
    Last Post: 03-12-2017, 10:25 AM
  2. Sum of calculated field in report
    By whisp in forum Reports
    Replies: 5
    Last Post: 02-12-2015, 02:56 AM
  3. Replies: 5
    Last Post: 09-14-2014, 02:34 PM
  4. Replies: 3
    Last Post: 05-03-2014, 03:26 AM
  5. Calculated column in a report
    By beanhead0321 in forum Reports
    Replies: 2
    Last Post: 08-16-2011, 08:48 PM

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