Page breaks or not depending what mood access is in.

Derek Brown
Derek Brown used Ask the Experts™
on
Can anyone point me to some useful document that may through some light on howon earth you work with page breaks.

I insert a page break to end one page so next page of report starts on a fresh page and it keeps giving an additional blank page.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
instead of page break, have you tried using/setting the Detail section property "Force New Page" ?

Author

Commented:
No but I'll give it a go
Thanks Ray
President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012
Commented:
The page break is really mis-understood and as Rey has already said, it should be avoided.

Your far better off to use the Keep Together and Force New Page property (Before or After Section) on sections to control formatting.

The page break control gives you a page break as soon as it is hit in the layout and that is irrespective of anything else.

So if Access is in the middle of moving to a new page because of the formatting, trips over your page break in the layout, then it does that immediately.  It then continues on with what it was doing.

I think I've used the hard page break once in all the years of Access programming and I can't even remember the reason why (it was LONG ago).

Jim.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Also, ..depending on your layout, there may be different ways to avoid blank pages.

So you need to provide a very specific example of your report (in a sample database), ...and exactly where you want the page to break (in all situations)
it is not clear if when you say:
I insert a page break to end one page
...if you are inserting a page break object, ...or setting the force new page property

Keep together (Section and Grouping)
Force New page
Repeat Section
...etc
...all can have some effect on the final output

JeffCoachman
Most Valuable Expert 2014

Commented:
Can anyone point me to some useful document that may through some light on how on earth you work with page breaks.

No, but I can shed some light on how I work with them.
Page breaks have a .Visible property.
If they are not visible, they don't happen.
If they are in a report section that is not visible, they don't happen.
I usually look at Sorting & Grouping and create an appropriate section to drop the Page Break into as the sole control.

Then with VBA, I set up conditions to make the Page Break visible or not as appropriate.
You REALLY need to have a good grasp of the order of events for Reports, though
https://support.office.com/en-us/article/Order-of-events-for-database-objects-e76fbbfe-6180-4a52-8787-ce86553682f9#bm5
And you need to watch out for the pitfalls of what occurs when a report Previews, versus what happens when it Prints, because -- contrary to intuition -- they are not identical.

Those things you usually discover by trial and error
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
Personally, it's best to stay away from hard page breaks.  Same is true in Word; you use them until you figure out how Word works and then you never bother with them again.

Jim.
Most Valuable Expert 2014

Commented:
I don't have them willy-nilly, but they're indispensable for things like a grouping on true/false field where if all the values are true,  or they are all false, no break is needed. But if there are some true and some false AND another condition not readily determined by the underlying query is also true that a break is then needed -- well, then a page break control is pretty much a must.

I've got 5 or 6 in 160 reports.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial