Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Conditional Page Break Challenge (XP/03)

    I have a report that has groupings based on hierarchical data. I am using the properties in the group footer to force a new page "After Section" which does what it is supposed to and looks great. The challenge is we want to the Report Footer (which contains the grand totals) to print on the same page as the last level of hierarchy, instead of printing on a new page.

    Does any one have an idea how to accomplish this??

    Thanks in advance for your ideas.

    Respectfully,

    Ken

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    La Verne, California, USA
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Page Break Challenge (XP/03)

    Try the technique at the ACCESS MVP website: http://www.mvps.org/access/reports/rpt0004.htm

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Conditional Page Break Challenge (XP/03)

    Perhaps I am not creative enough, but I am struggling on how to utilize that link to suppress a page break.

    Thanks,

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conditional Page Break Challenge (XP/03)

    To suppress a pagebreak, set it's visible property to false like this:

    Me.PageBreak1.Visible = <somecondition>

    This assumes the name of the pagebreak control is PageBreak1. You can enter an expression that evaluates to true or false in parens where I have put <somecondition>.
    Charlotte

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conditional Page Break Challenge (XP/03)

    <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15> I see that I answered the wrong question. You don't want a conditional page break using a control, you want to suppress moving to a new page if you have reached the last page of the report, right? Something like, <code> If Me.Page = Me.Pages Then Me.Section.ForceNewPage = False</code>
    Charlotte

  6. #6
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Conditional Page Break Challenge (XP/03)

    Charlotte,

    That looks awesome. I will try it when I get back to pc with the code. Your answer does bring one question to mind, however. IF the page footers use "="Page " & [Page] & " of " & [Pages]" will I need to change it to:
    ="Page " & [Page] & " of " & [Pages]-1

    Thanks for all your help.

    Ken

  7. #7
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Conditional Page Break Challenge (XP/03)

    Charlotte,

    Tested your solution and it was SUCCESSFUL! THANKS! Also it did require using "[Pages]-1" for page count to be correct.

    Thanks again for you help!

    Ken

Posting Permissions

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