Results 1 to 2 of 2
  1. #1
    ryp is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    11

    Question Sum Text Box Value from Report Detail

    I have a text box in the detail section of a report, and it's named txtDiff (and its control source is the subtraction of two other fields in the detail). It works fine, and I simply want to sum it in the Page Footer or Report Footer. So I added a new text box with a control source of
    Code:
    =Sum([txtDiff])
    . But when I run the report, I get an Enter Parameter Value for txtDiff. I've tried the following:
    • Moved it to the Page Footer from the Report Footer--doing this removes the Enter Parameter Value pop-up, but the field still evaluates to an #Error.
    • Added the full report reference to the control source (
      Code:
      =Sum(Reports! ... ![txtDiff])
      ).
    • Played around with Nz formula, as some of the difference values may have come up as blank/null.

    Nothing seems to work. Is there a trick to summing a report text box that isn't tied to a specific field in the underlying query?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You can't sum a calculated control. Either move the calculation to the report's source query so it becomes a field that can be summed, or sum the calculation in the report footer:

    =Sum(Field1 - Field2)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 08-19-2016, 05:10 PM
  2. Hide Detail In A Report
    By Derrick T. Davidson in forum Programming
    Replies: 2
    Last Post: 01-29-2016, 02:02 AM
  3. Replies: 4
    Last Post: 11-16-2015, 08:15 AM
  4. Report with Two Detail Sections?
    By beribimba in forum Access
    Replies: 2
    Last Post: 08-30-2011, 03:04 PM
  5. report detail duplication
    By archie in forum Reports
    Replies: 5
    Last Post: 09-17-2009, 08:51 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