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.
rcharestAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.