Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to force a pagebreak ?

Status
Not open for further replies.

jcrtektip

Technical User
Mar 3, 2004
18
0
0
SG
I want to force a pagebreak after printing n lines.
There are three layer of group and subgroup, in each group or subgroup data may or maynot get printed (format group).
each time I keep incrementing the counter. based on this counter I need to force the pagebreak.
How ?
 
Hi,

Place a page break called PBreak after the line and copy the following code into the Detail_format event procedure

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Counter = 'n' Then
Me.[PBreak].Visible = True
Else
Me.[PBreak].Visible = False
End If
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top