Forcing group headers on new page

  • Thread starter Thread starter Sangee
  • Start date Start date
S

Sangee

Hi i have some trouble printing reports based on condition. (Access
2003)
I have report being printed (2 sided print out). This reportd has a
groupheader0 which is grouping by counties. I would like to program it
in such a way that 1) I want the group to start in a new page + If the
new page comes out face up its fine. But if the new page is face down
i would like to force it to then next page. Is there some way i can do
this by VBA code.

Any help appreciated.
Thank you in advance!
 
Hi everyone,

I think i figured a soultion myself.
Incase someone needs this in future, this is what i came up with.
I added a pagebreak to the group header and added this piece of code
to its format event.

If Me.Page Mod 2 = 0 Then
Me.PageBreak14.Visible = True
Else
Me.PageBreak14.Visible = False
End If

so i am closing this topic here.
 
Good piece of work. It is almost exactly what I would have recommended. The
only difference is (and this is not really any better, but a way to reduce
lines of code)

Instead of (note indentation and how it improves readability)
If Me.Page Mod 2 = 0 Then
Me.PageBreak14.Visible = True
Else
Me.PageBreak14.Visible = False
End If

I would do it like this
Me.PageBreak14.Visible = Me.Page Mod 2 = 0
 
Back
Top