Insert VBA Page Break

J

Jim

How do I insert a new page within a report using vb code.

I'm at the place in the report header where I want to do it but I don't
know how to insert the form feed

.............................
Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
If Me.Pages > 0 Then
If GrpArrayPage(Me.Page) = 1 And (Me.Page Mod 2) = 0 Then
'==================================
'insert additional blank page here HOW?
'==================================
End If
End If
End Sub
.............................

The user does duplex printing (both sides of the paper) and wants the
new group on its "own" sheet, i.e. an odd page number.

Thanks in advance
Jim
 
M

Marshall Barton

Jim said:
How do I insert a new page within a report using vb code.

I'm at the place in the report header where I want to do it but I don't
know how to insert the form feed

............................
Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
If Me.Pages > 0 Then
If GrpArrayPage(Me.Page) = 1 And (Me.Page Mod 2) = 0 Then
'==================================
'insert additional blank page here HOW?
'==================================
End If
End If
End Sub
............................

The user does duplex printing (both sides of the paper) and wants the
new group on its "own" sheet, i.e. an odd page number.


Insert a Page Break control at the bottom of the group
footer and use a littl code to make it visible/invisible
depending on the page number. E.g.
Me.pgBreak.Visible = (Me.Page Mod 2 = 1)
 
J

Jim

Thanks! That's what I needed.

Jim

Marshall said:
Insert a Page Break control at the bottom of the group
footer and use a littl code to make it visible/invisible
depending on the page number. E.g.
Me.pgBreak.Visible = (Me.Page Mod 2 = 1)
 

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