Results 1 to 3 of 3
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Force new page - report (Access 2003)

    I have a report that is an Invoice. There is an InvoiceID Group Header and Footer, and a Details section that lists all the items.

    The Invoices can contain lots of items, and the details section can grow as some of the item descriptions can be quite long, so the Invoices can easily run to more than one page.

    In the Group Footer is a collection of summary stuff - totals, amounts paid etc. The Group Footer has its Keep Together property set to yes, so if it can't fit at the bottom of a page, it all moves to the next page.

    I want to avoid having the summary at the end being on a page by itself. So if that is going to happen, I want to move the last detail record (or even two) to the new page as well.

    I can't think of how to do this.
    Regards
    John



  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Force new page - report (Access 2003)

    See Re: Report widows or this newsgroup post. Does that help?

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Force new page - report (Access 2003)

    Wonderful!

    This is the code I have put in. The report has a Page footer as well. This results in two records spilling onto the next page with my test data.

    Dim lngHeight As Long
    lngHeight = Me.Top + Me.Section(6).Height + Me.Section(4).Height + Me.Section(0).Height
    If lngHeight > 12.7 * 1440 Then
    Me.PageBreak.Visible = True
    Else
    Me.PageBreak.Visible = False
    End If


    Thanks
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •