Results 1 to 8 of 8
  1. #1
    KelleyM is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    9

    Header Repeats at Top Page Problem

    Hello. This is my first post here. I am usually lucky with just googling my problem but I am having no success. My problem is this: I have a report that shows groups of procedure codes that belong to a larger family.

    In general the report looks like this

    Larger Family Information 1
    Related Procedure Information A
    Related Procedure Information B


    Larger Family Information 2
    Related Procedure Information A
    Related Procedure Information B
    Related Procedure Information C
    And so on. What I want it is, if the related procedure information spills onto the next page, that the larger family information is repeated at the top of that page. So, I set the group header repeat section to yes. And now it repeats at the top of the page like I wanted. However, if the last line of the detail section is the last line of the page the group header repeats at the top of the next page, even though there is no more information. (Right now this is happening on page 3 or the report.)
    I have attached a clean version of the database with just the problematic report and its underlying table.

    I would greatly appreciate any incite. I have tapped my resources here.



    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    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
    KelleyM is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    9
    Thank you for your response. That did not fix the problem. I still get a repeated title if the section ends at the end of the page. However in case I misunderstood what the other poster said, this is what I did

    My subroutine
    Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
    Cancel = Me.txtCountGroup = 0
    End Sub

    My textbox
    Name:txtCountGroup
    Control Source: =Count([FCode])
    Visalbe: =no

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    That looks right. Although wildcard in the Count function would be good enough.

    Format events only trigger with PrintPreview or NormalView (to the printer). Did you view report with either of those options?

    I don't have anything like your report I can test with. Do you want to provide project for analysis? 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.

  5. #5
    KelleyM is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    9
    I think I attached the database with the report to the original post.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I was looking for version with your code attempt but I downloaded the posted file and tried code.

    I put the textbox in the Family group Header. Code in the GroupHeader1_Format event. Seems to work.

    The code in the Detail_Format event errors. What are you trying to do there?
    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.

  7. #7
    KelleyM is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    9
    I put the textbox and code in the database attached here. I still can't see any change to the formatting. Am I doing something wrong?

    Concerning the code in the detail section, I reviewed it. I have no recollection of creating it and no idea what I wanted it to do. I took it out.

    Copy of DB v2.zip

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I tested your setup. I get 11 pages and the group header does not show on page 11. However, the page header does show on page 11 even though no data.

    I resized the report footer so it has 0 height and the blank last page no longer shows so now have 10 pages. I removed the Count textbox and the code. No blank page. This was with your later posted file and Access 2007. With the earlier version and Access 2010 I also had to reduce the space of the Group footer.

    So I seem to get different behavior from this report on different machines with different versions of Access. In no case did the code and Count make a difference. Sorry, not sure what needs to be done to control this formatting.
    Last edited by June7; 07-03-2012 at 02:07 PM.
    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. Page Header & Forced Page Break
    By Donnydon in forum Reports
    Replies: 1
    Last Post: 09-08-2011, 08:24 AM
  2. Replies: 3
    Last Post: 08-07-2011, 09:22 PM
  3. Landscape Page header on a Report
    By Alan1 in forum Reports
    Replies: 2
    Last Post: 07-25-2011, 03:25 AM
  4. Header Groupings Continued on second page
    By herbc0704 in forum Reports
    Replies: 1
    Last Post: 12-29-2010, 12:25 PM
  5. Report Header on Each Page
    By nweird in forum Reports
    Replies: 1
    Last Post: 07-24-2009, 07:57 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