Results 1 to 2 of 2
  1. #1
    annah is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2015
    Posts
    5

    Access 2007: How to total controls from a subreport which appears on the main report more than once

    Hello!

    I am making a report to track progress on a goal. Each person on my staff has assignments, and our team goal is to complete X% of assignments within a specified time frame. My report needs to show individual progress as well as team progress.

    My main report is bound to my staff table. It is grouped by employee ID#.

    In the detail for the employee ID# group, I have a subreport ([StaffSubreport])which is bound to my assignments table. The subreport and main report are linked by the employee ID#. In the report footer of the subreport, I have two fields: txtCompleteCount and txtPendingCount.

    This results in my subreport displaying once for each employee.... in total it displays 12 times.

    In my report footer, I have a control with this code, which returns the count from the last subreport displayed:

    Code:
     =[StaffSubreport].[Report]![txtCompleteCount]
    What I want is code that will display the total count from all the times the subreport was displayed. I've googled and googled and can't find this anywhere!

    Hopefully my explanation of my report makes sense... it is hard to describe. Here's a visual representation of what it looks like in print preview if that helps.

    Report Header
    .... Employee ID# Header


    ........Employee ID# Detail
    ............Subreport "StaffSubreport"
    ............Complete/Incomplete Header
    ................Assignment Detail
    ............Complete/Incomplete Footer
    .... Employee ID# Footer

    .... Employee ID# Header
    ........Employee ID# Detail
    ............Subreport "StaffSubreport"
    ............Complete/Incomplete Header
    ................Assignment Detail
    ............Complete/Incomplete Footer
    .... Employee ID# Footer

    .... Employee ID# Header
    ........Employee ID# Detail
    ............Subreport "StaffSubreport"
    ............Complete/Incomplete Header
    ................Assignment Detail
    ............Complete/Incomplete Footer
    .... Employee ID# Footer

    (repeat Employee ID grouping several more times)

    Report Footer

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If you want to provide db for analysis and testing, follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 6
    Last Post: 05-01-2013, 06:37 AM
  2. Replies: 1
    Last Post: 04-15-2013, 10:02 AM
  3. Report w/ Subreport locks up Access 2007
    By guyc in forum Reports
    Replies: 4
    Last Post: 05-12-2011, 09:22 AM
  4. Replies: 4
    Last Post: 03-14-2011, 11:12 PM
  5. Replies: 1
    Last Post: 05-21-2009, 08:13 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