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

insert page break on odd pages

Status
Not open for further replies.

thelpme

Technical User
Apr 4, 2005
22
US
I'm new to Access so please let me know if I need to supply any additional info.

I created a report in which I'm grouping data. I have it set to print each new group starting on a new page. My problem is I'm printing the report double sided and so I need the report to insert a page break if the new page starts on an odd number page. This way it doesn't end up on the back page of the previous group. Does anyone know how to do this?

Thanks in advance.
 
put a page brake control in the group footer

and enter this code in the group footer format event

Code:
Me.PageBreak1.Visible = Me.Page Mod 2 > 0
 
This doesn't seem to be working for me. I'm really a newbie when it comes to Access so I may be doing it wrong. Here's what I did:

1) right-click on group header and choose properties
2) on the Format tab choose "force new page: after section"
3) on the Event tab, choose On Format, Code Builder
4) in the procedure code I type in the code above

It seems to take but when I Print Preview the report I get "Compile Error: Method or data member not found" with the text ".PageBreak1" highlighted. I'm working with Access 2003.
 
first off, pwise said to put that code in the group FOOTER, not header.

did you try in the footer and just put header here? or did you really try this in the header?


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
I meant footer but I just tried the header and it doesn't work also.
 
You have to create a Page Break control named PageBreak1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top