Results 1 to 2 of 2
  1. #1
    gopherking is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    71

    Perform Calculation on fields from Main Report and two Sub-Reports

    I have successfully performed calculations on fields that exist on a Main Report and also within the Report Header/Footer of a Sub-Report, but now I have a new challenge that I can't seem to get it right. I am in need of a calculation between a field on the Main Report, a field in the Report Footer of the 1st Sub-Report, and a field in the Report Detail of the 2nd Sub-Report.



    Here is the basic equation that I am using in the Control Source of the field located in the Main Report - Report Footer section:

    =Nz([JAN],0)-[1st_Sub_Report].[Report]![JAN Sum]-[2nd_Sub_Report].[Report]![JAN Sum]

    [JAN] - Field on the Main Report in the Detail Section
    [1st_Sub_Report].[Report]![JAN Sum] - Field on the 1st Sub-Report in the Report Footer Section
    [2nd_Sub_Report].[Report]![JAN Sum] - Field on the 2nd Sub-Report in the Detail Section

    I know that I can get the calculation to work if on the 2nd Sub-Report the field exists in the Report Footer, but the problem is that if there is no data in the Detail section of the Sub-Report, then it will not print (even the Footer).

    Any thoughts on how I can get this to work, I would greatly appreciate it!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    This thread is marked as solved. If it isn't, I often use this:

    nnz function
    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. Same calculation on multiple fields
    By tko in forum Queries
    Replies: 4
    Last Post: 05-29-2011, 12:08 PM
  2. SQL expression to perform a calculation
    By springboardjg in forum Queries
    Replies: 1
    Last Post: 05-20-2011, 06:57 AM
  3. One main report from multiple reports ?
    By skocev in forum Reports
    Replies: 4
    Last Post: 03-31-2011, 02:30 PM
  4. Date Calculation within same fields
    By mslieder in forum Queries
    Replies: 3
    Last Post: 01-26-2006, 10:08 AM
  5. Subform vs main form calculation
    By fadone in forum Forms
    Replies: 17
    Last Post: 12-21-2005, 07:27 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