INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Hiding controls in section still gets page with Force New Page

Hiding controls in section still gets page with Force New Page

Hiding controls in section still gets page with Force New Page

(OP)
I have a report that I group by the unique key for the recordsource to add a few extra header sections to the report. Largely this is done to use keep together and force new page in preferred ways. It is a long report height-wise.

In some cases I need to hide the detail section. Noteworthy is that the section is set with Can Grow and Can Shrink set to true. Also using EITHER a force new page Before the detail section OR using an After section on the header before the detail section is causing an extra page that is blank except for the page footer. By changing the background color of the detail section it does not look like this page is the detail section nor the previous section as the line I added for testing at the bottom of the section is not on the blank page.

Most of the controls are unbound and set programmatically on the Report header's format event. Additionally, the below code runs to hide the controls in the detail section... obviously in this case blHideSection is true.


CODE

If blHideSection Then
    'Hide all controls in Detail section
    For Each ctl In Me.Section(acDetail).Controls
      ctl.Visible = False
    Next ctl
  End if 

Everything in the detail section is not visible, so everything should collapse and seems to except that there seems to be a phantom page left over.

I am hoping something jumps out at someone. I am not even having ideas of anything to try or research at the moment.




RE: Hiding controls in section still gets page with Force New Page

(OP)
The solution is so easy I feel like an idiot for not thinking of trying it right away. Instead of using Force new page (before or after section), I added a page break control and then made it invisible at the same point I did the controls in the detail section. Obviously the page break is in the section before.

It was too obvious. My brain needed the weekend to stew on that one. The old "can't see the forest for the trees" problem.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close