Results 1 to 6 of 6
  1. #1
    jnes006 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    5

    Sub Report Changes Values When Placed in Main Report

    Hello



    In Access 2010, I have a simple sub-report I use to count a field. Works perfect by itself. However, when I place it in the main report the results change. And it doesn't matter where I place it in the Main report, it still returns a low count. Is there some filter I am missing?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Are the Master/Child Links properties of subreport container set? That could filter out some records.
    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.

  3. #3
    jnes006 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    5
    Hi, thanks for your response.

    I do have the master/child fields set based on a date field. I hope to have the sub report and main report return monthly results. Is it correct the master/child need to be linked?

    thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    If you want the main and sub reports to be synchronized.

    The subreport probably isn't filtered to particular month when it is opened stand alone so all records regardless of month are included.
    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.

  5. #5
    jnes006 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    5
    Is there a way to keep the sub and main reports synchronized, but have the correct results the sub report produced when opened stand alone?

    thanks again

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Pass month filter criteria to the report when opened stand alone. Assuming you have a date field, something like:

    DoCmd.OpenReport "report name", , , "Format([datefield], 'yyyymm')=" & Me.textboxwithYearMonthValue
    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: 5
    Last Post: 12-08-2012, 10:10 PM
  2. Replies: 2
    Last Post: 06-15-2012, 07:32 AM
  3. Replies: 1
    Last Post: 03-23-2012, 01:22 PM
  4. Replies: 1
    Last Post: 03-07-2012, 09:00 AM
  5. Replies: 0
    Last Post: 10-24-2008, 11:20 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