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

What is the proper syntax for forci

Status
Not open for further replies.

buhgman33

Programmer
Jul 18, 2003
24
IL
What is the proper syntax for forcing a new page with VBA?
If the list of items in the detail section of the report exceeds a certain number, I want to force a new page. How is this accomplished? Any help would be appreciated.
 
In the report's design mode, right click on the heading seperator and go to Properties. There's a "Force New Page" option in the Format tab. Can do it before and / or after each section.

Not sure how to do it 'programmatically'. Sorry if this isn't what you were asking.

--
JR
 
No, I am looking for a way to do it in VBA. I have a report with 3 sections. Because these sections are limited in length, I want to tell the report to start a new page and keep the same page format, if the number of items in the detail section exceeds a certain number.
I have tried:
Me.Detail.ForceNewPage = True
but I get an error message.
All suggestions are appreciated.
 
Open your report in acHidden and set the bottom Margin to the desired value.

then:

Reports("rptYourName").BottomMargin = 1440

Then open in the Normal Mode. I set the margin to one inch. There are 1440 twips to the inch.

other values can also be set.

Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top