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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force a pagebreak after x records

Status
Not open for further replies.

Reinier11

Technical User
Jun 19, 2003
22
ES
Hi,

Can anyone please help me on the following:
I'd like to force a pagebreak on a report after for instance
10 records haven been displayed. How would I do that?

Thanx in advance,

Reinier
 
Put a textbox in your report detail section and set the control source to
=1
Then set the running sum value to Over All and the Visible property to No.
Add a pagebreak to your report.
Then in the Format event for the Detail section put this code.
If TextboxName Mod 10 = 0 Then
Me.PageBreakName.Visible = True
Else
Me.PageBreakname.Visible = False
End If

This should do it for you.

Paul
 
Hi Paul,

Thank you very much, this works perfect. And for now I can get away with this report's layout.
But, (there's always a but..) for the convenience of explaining the problem I didn't mention I want the page 'to be broken' after printing the Footer of the first group. How would you do that?

Gr,

Reinier
 
I don't know that you can do that depending on how your info is set up in the report. You might try moving the pagebreak to the bottom on the Group Footer and see if that helps. Otherwise, you will have to give us some more info as to how the report is structured to know if it can be done.

Paul
 
Hi Paul,

My info is set up as follows: the report has a group header and footer. In the group footer there's a subform.
What would be realy nice to do is let this report print only 8 detail records, and only 8 related records in the footer.
I had already tried placing the pagebreak in the footer, just to get the subfrom printed before breaking. Without any result.
For now I've decided to leave the way it is, I've other problems to worry about.

Gr,
Reinier
 
any idea on how you could adapt this for use on a continuous form so only 10 records are shown per form, and you could create 'pages' in forms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top