How to add a blank page when needed?

G

Guest

I have a report that prints out by Customer Name. Sometimes a customer will
have 3 pages, sometimes four, ect. I want to print the report double sided so
I need to have each customer have an even number of pages.
Help?
 
M

Marshall Barton

ssims30 said:
I have a report that prints out by Customer Name. Sometimes a customer will
have 3 pages, sometimes four, ect. I want to print the report double sided so
I need to have each customer have an even number of pages.


Try adding a PageBreak control (named pgNew) to the top of
the customer group header section. Then add code to the
group header section's Format event procedure:

pgNew.Visible = (Me.Page Mod 2 = 0)

Make sure that the customer group header section has its
ForceNewPage Property set to Before Section.
 
G

Guest

Marshall-
Thank you so much for your help. I have looked all over the internet to no
avail. I have added the new page break and named it pgNew and made sure that
the Force New Page was set to before section. I then copied your code and
added to the Customer Group Header. I recieves this error:
Access can not find the macro 'pgNew"

I then added an equal sign to the equation (thinking, that maybe it needed
it) so it read as follows:
=pgNew.Visible = (Me.Page Mod 2 = 0)
and recieved this error:
The object does not contain the Automation object 'Me'

My report is over 2000 pages and I really don't want to have to take into
into a pdf and add blank pages, so any help would be so appreciated!!
Stacey
 
M

Marshall Barton

Apparently you are trying to enter the line of code into the
OnFormat property. Instead, you should put it into the
Format event procedure. The OnFormat property needs to
have:
[Event Procedure]

If you don't know how to find the event procedure, just
click on the code builder button [...] at the right edge of
the event property.
--
Marsh
MVP [MS Access]


ssims30 wrote:-
 
G

Guest

I can't believe I did that- I read your post so many times and didn't see the
event procedure part! Thank you thank you! it works like a dream!
Stacey

Marshall Barton said:
Apparently you are trying to enter the line of code into the
OnFormat property. Instead, you should put it into the
Format event procedure. The OnFormat property needs to
have:
[Event Procedure]

If you don't know how to find the event procedure, just
click on the code builder button [...] at the right edge of
the event property.
--
Marsh
MVP [MS Access]


ssims30 wrote:-
Thank you so much for your help. I have looked all over the internet to no
avail. I have added the new page break and named it pgNew and made sure that
the Force New Page was set to before section. I then copied your code and
added to the Customer Group Header. I recieves this error:
Access can not find the macro 'pgNew"

I then added an equal sign to the equation (thinking, that maybe it needed
it) so it read as follows:
=pgNew.Visible = (Me.Page Mod 2 = 0)
and recieved this error:
The object does not contain the Automation object 'Me'

My report is over 2000 pages and I really don't want to have to take into
into a pdf and add blank pages, so any help would be so appreciated!!
Stacey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top