Forcing group headers on new page

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!
 
S

Sangee

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top