Results 1 to 7 of 7
  1. #1
    BrockWade is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    63

    Summing two report totals on form

    Not sure this can be done, but here goes... I have a form with two reports displayed simultaneously... I need the total of each to appear in a textbox... I tried the below:

    ([Reports]![rptBookDepositTotal]![AccessTotalsAmount])+([Reports]![rptPrevUnRecTotal]![AccessTotalsAmount])

    Maybe I should merge the two driving queries (?):



    SELECT PreviousUnRec.Store, PreviousUnRec.Amount
    FROM PreviousUnRec
    ORDER BY PreviousUnRec.Store, PreviousUnRec.Amount DESC;

    SELECT Book.Store, Book.Amount, Book.Date
    FROM Book
    ORDER BY Book.Store, Book.Amount DESC;

  2. #2
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Summing two report totals on form

    Did you add that to the control source of the unbound textbox?
    Was there an equals (=) sign at the start?

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    you're talking about referencing subreports on a main report you'll need the right syntax:

    Reports![main report name]![subreport control name].Report![control name]

    see this article:

    http://support.microsoft.com/kb/209099

  4. #4
    BrockWade is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    63
    I may be close... the fully qualified naming of the textbox's control source is
    =([Form]![Book Bank and Unmatched]![qrySumBookDeposit]![SumField])+([Form]![Book Bank and Unmatched]![qrySumPrevMon]![SumField])
    with the form being "Book Bank and Unmatched" and one report being "qrySumBookDeposit" and the other being "qrySumPrevMon" with a report field called "SumField" in both

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    are your subreports just datasheet views of queries (the qrySumBookDeposit makes me think so) or is the subreport actually a report named qrySumBookDeposit?

    you want the qrySumBookDeposit and qrySumPrevMon to actually be the NAMES of your subreports as they appear on your main report, not the source object.

  6. #6
    BrockWade is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    63
    qrySumBookDeposit and qrySumPrevMon are the actual names of the subreports... should I be referencing the "Child" name like Child47, Child49, etc.?

  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    The names of the subreports (as objects) may be different than the names of the objects on your report, look at the NAME field of the two subreports

    Here's an example

    BrockWade.zip

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

Similar Threads

  1. Summing Time is giving me wrong totals.
    By Nuke1096 in forum Access
    Replies: 7
    Last Post: 06-13-2013, 11:00 AM
  2. Summing Sum totals
    By Jamescdawson in forum Access
    Replies: 3
    Last Post: 11-22-2012, 03:11 PM
  3. Summing totals horizontally in report
    By UnfinishedStory in forum Reports
    Replies: 3
    Last Post: 10-20-2011, 08:15 AM
  4. Summing Report Totals
    By bugme in forum Reports
    Replies: 3
    Last Post: 05-09-2011, 09:36 AM
  5. Summing totals in reports
    By Harley Guy in forum Reports
    Replies: 4
    Last Post: 04-06-2010, 08:53 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