Re: how to print the last page
- From: "BzyQ" <mmbakowie@xxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 09:27:14 +0100
Uzytkownik "fredg" <fgutkind@xxxxxxxxxxxxxxx> napisal w wiadomosci
news:1okggqv4vbr8t.1qu1l91o8doeb.dlg@xxxxxxxxxxxxx
On Thu, 29 Nov 2007 10:07:05 +0100, BzyQ wrote:Thanks !! that works perfect
hi
how do I, in vba code, open a report by DoCmd.OpenReport in acViewNormal
mode and force it to print only the last page of it instead of the all
pages ?
BzyQ
Open it in acPreview, not in acNormal.
You can determine the last page of the report by including an unbound
control in the report's Page Footer section:
=[Pages]
or
="Page " & [Page] & " of " & [Pages]
If you don't wish to actually show the above control, just make it not
visible.
Then code a Command button click event on your form:
DoCmd.OpenReport "ReportName", acViewPreview, , , acHidden
DoCmd.SelectObject acReport, ReportName, False
DoCmd.PrintOut acPages, Reports!ReportName.[Pages],
Reports!ReportName.[Pages]
Docmd.close acReport, "ReportName"
.
- References:
- how to print the last page
- From: BzyQ
- Re: how to print the last page
- From: fredg
- how to print the last page
- Prev by Date: Re: Problem with append query - memo field
- Next by Date: Re: Embedding images into a table
- Previous by thread: Re: how to print the last page
- Next by thread: error in docmd.outputto...
- Index(es):