• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Forcing Conditional Page Breaks in MS Acess 97

Hi,

In MS Access 97 I am attempting to force a page break in a subreport To control the Subreport size.  What is currently happening is that the number of lines in my subreport will cause the subreport page length to exceed the Main report, and run over the lower main report data.

I'm usung the sample code as shown in the Access 97 help files, but no success. The sample code as shown is:

If Me![Counter] = 10 Then
    Me![PageBreak32].Visible = True
End If

in the detail section "On Print" event where I want the break, with the code of:

Me![PageBreak32].Visible = False

In the report header "Format" event.

 I don't understand if the [Counter] is a built-in function, or I have to create this.

Thanks for any assistance.
0
rcharest
Asked:
rcharest
  • 2
2 Solutions
 
tbsgadiCommented:
Hi rcharest
Counter isn't a built-in function.
Place a Hidden TextBox called Counter in the Detail Section of the subreport and set the RunningSum Property to OverAll.

Good Luck!

Gary
0
 
rcharestAuthor Commented:
Hi Gary,

Thanks!  This now works for the subreport itself, but when I pull up the main report the subreport pagebreak is not doing anything.

Do you know of a way to force a page break within a subreport?

Ron
0
 
tbsgadiCommented:
The pagebreak doesn't work for subreports.
Check out
http://www.experts-exchange.com/Databases/MS_Access/Q_21111927.html
for a different idea
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now