Print last page of report

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

My boss insists on maintaining a paper copy of a customer
waiting time log. I would like to use a command button to
generate only the last page of this report so that the
whole thing doesn't have to be printed. Can you help?

Thanks,

Mike
 
Rather than printing only the last page, which could
result in very awkward. You may want to base the reprot
on a query and I asume there is a time/date block to this
waiting log. You could select to only print the last let
us say 24 enteries by setting the query properties to
select the first 24 and order the query descending on this
time/date variable.
Hope this helps.
Happy Thanks Giving
Fons
 
If you received the answer could you let me know, as
that's the exact problem i'm having.

THanks.
 
Mike said:
Hi,

My boss insists on maintaining a paper copy of a customer
waiting time log. I would like to use a command button to
generate only the last page of this report so that the
whole thing doesn't have to be printed. Can you help?

Thanks,

Mike

Mike,
The last page number of any report is calculated by the report whenever
you have a calculated control that computes [Pages].
If you do not already have a control in your report, add one.
In an unbound control:
=[Pages]
You can make it not visible if you don't wish to display it.
Or, if you would like to display it on the report:
= "Page " & [Page] & " of " & [Pages]
will do nicely, also.

Then code a command button on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.SelectObject acReport, "ReportName", False
DoCmd.PrintOut acPages, Reports!ReportName.[Pages],
Reports!ReportName.[Pages]

Note that the report name is within parenthesis in the first 2 lines,
but without the parenthesis in the PrintOut line.

Only the last page will print out.
 
fredg said:
Mike wrote:
*** snipped ***

Mike,
The last page number of any report is calculated by the report whenever
you have a calculated control that computes [Pages].
If you do not already have a control in your report, add one.
In an unbound control:
=[Pages]
You can make it not visible if you don't wish to display it.
Or, if you would like to display it on the report:
= "Page " & [Page] & " of " & [Pages]
will do nicely, also.

Then code a command button on a form:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.SelectObject acReport, "ReportName", False
DoCmd.PrintOut acPages, Reports!ReportName.[Pages],
Reports!ReportName.[Pages]

Note that the report name is within parenthesis in the first 2 lines,
but without the parenthesis in the PrintOut line.

Only the last page will print out.
Mike,
Ooops, a slip of the fingers.
The line in my previous post
Note that the report name is within parenthesis in the first 2 lines,
but without the parenthesis in the PrintOut line. <

should have read:

Note that the report name is within QUOTES in the first 2 lines,
but without the QUOTES in the PrintOut line.
Hope this solves your problem.
 
Back
Top