Discussion Locked

Access 97 Double Page Break

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a report that is printed duplex (both sides of the paper) and it does a page break on the name footer section whenever the name changes. Sometimes the detail for that name causes an uneven number of pages, but I want to be able to separate the report and give each person their section. The report does one page break to start the next person at the top of the next page, but when the detail for the first name causes an uneven number of pages for that person, it makes the second person's info start on the back of the first person's page. How do I add an extra page break or a blank page only when the detail causes an uneven number of pages
for one person? The detail is not the same for every person and each line in the detail is not the same.

3 replies

by brent.brewer

First change your 'force new page' to the Header to be 'before section', and remove the 'force new page' in the footer.

Duplicate the current 'name' grouping and turn the footer on in this second grouping.

Insert in the original footer (labeled Groupfooter0) 2-pagebreaks, this will be the lower of the two footers in design view. Set the visible property to 'no'.

If you need to display information in the footer use the new footer you created, if you do not then set the visible property of the second footer to 'no'.

In the second footer, (labeled Groupfooter1) , the higher of the two in design view, set the 'On format' to [Event procedure]. (Code)

Insert this code into the 'On Format' sub:
--------------
Dim pagecount As Integer
pagecount = Page
If pagecount / 2 <> Int(pagecount / 2) Then
Me.GroupFooter0.Visible = True
Else
Me.GroupFooter0.Visible = False
End If
-------------

This code determines if the footer is ending on an odd number page. If it is then it makes GroupFooter0 visible which contains the 2 page breaks.

If you are unsure about duplicating the 'name' grouping, email me or post a reply here.

by llsteichen

Thank you very much. Your solution worked. It was terrific of Brent to supply a solution and terrific of RechRepublic to offer this kind of service.
Thank you,
Lorna

This discussion is closed to new replies.