How to make a new group start on an odd nbr page?

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I have to create a report that requires the first page of each group to
start on an odd-numbered page, just like the chapters in a book. I would
appreciate any suggestions about how to do this.

Thanks,
Ron
 
Place a page break control at the end of the group footer section.
In the format event of the group footer, check if the current page (Me.Page)
is an odd number. If it is, set the visible property of the page break
control to true, otherwise set it to false.
 
I used the following code for the group_footer_Format event:
If Me.Page Mod 2 = 0 Then
Me.PageBreak.Visible = True
Else
Me.PageBreak.Visible = False
End If
but it does not add an extra page to start the next section on an odd
page. It does not appear to do anything. I specify
group_header_ForceNewPage = Before_Section. Any suggestions?
 
What version of Access are you using? This works for me in A97 and 2K.
Make sure the height of the group footer is not zero.
It should not make any difference, but my report required a minimum of 2
pages, so Group_header.Forcenewpage is set to AfterSection also.
Group_footer.Forcenewpage is set to AfterSection

You should use:
If Me.Page Mod 2 <> 0 Then
Me.PageBreak.Visible = True

The idea being that if the last section ended on an odd page the next would
have started on an even page and you want it to start on an odd page.

Hope this helps.
 
Thanks for your help, Alphonse. The problem was that I did not have a
large enough space for the group footer. As soon as I increased it and
changed the code to do what I wanted, it worked like a champ. BTW, I am
using Access 2002.

Thanks Again, Ron
 
Back
Top