Not Print Last Page of a Report

G

Guest

Depending on a value on form, I want to not the last page of a report.
Using an event procedure of the report , is there a way to code so the last
page does not print? I use the Report Open event to perform several other
procedure based on the value of the form. I just can not figure out how to
stop the last page from printing.

Thanks for any help, Lamar
 
M

Marshall Barton

Lamar said:
Depending on a value on form, I want to not the last page of a report.
Using an event procedure of the report , is there a way to code so the last
page does not print? I use the Report Open event to perform several other
procedure based on the value of the form. I just can not figure out how to
stop the last page from printing.


The report will need a text box that refers to the Pages
property. Then the Page event can use the line of code:

Cancel = (Me.Page = Me.Pages)
 
G

Guest

Marshall,

I do not understand when you say "The report will need a text box that
refers to the Pages property". I have txtbox named "txtPages" on the last
page of the report. How do I refer to this txtPages?
 
M

Marshall Barton

Any text box that references Pages in its expression will
do. A common thing to do is to put the text box in the page
footer section and use the expression:
=Page & " of " & Pages
 

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