Access report preview and print only the first page

J

jmslab01

Hello,

I'm using 2 buttons for reporting counted values from a tableform.
The counted values are the results of all records and the report now
shows as much pages as there are records.
On each page the same data is reported.

Problem now is that when the user push on printreport then...... he
got a lot of (the same)pages.
Till now I solve it to say.... only print the first page.

Is there an option that the report shows only page 1 of 1, so the user
can only print this one.

Below the macro linked to 2 buttons for the same report.
----------------------
'Based on the filter:
DoCmd.OpenReport "RExxx", acPreview, , Me.Filter
Reports!RExxx.OrderBy = Me.OrderBy
Reports!RExxx.OrderByOn = True
----------------------
'Based on all records:
DocName = "RExxx"
DoCmd.OpenReport DocName, A_PREVIEW
----------------------

help me out please,....

regards,
Johan.
 
D

Duane Hookom

Isn't the actual problem with the report that prints the same records/values
over and over? I would try to fix this so you wouldn't have to worry about
too many pages printing with your macro.

You might want to provide more information about your report's record source
and what you mean by "tableform" and "counted values are the results of all
records". Are there subreports?
 
L

Larry Linson

A start on the information we need to help you would include "what is the
data, how is it arranged, and what does 'counted values' and 'tableform'
mean?" When you say "user push on printreport", do you mean the user clicks
on a Control on a Form?

If you only want to report a Sum, or a Count, you can use a Totals Query to
obtain those, and use that Totals Query as the Record Source of the Report.

Create the Query with the Query Builder including the Field you want to Sum
or Count, then click View | Totals to create a totals Query -- choose the
proper option beneath the Fields in the Totals Query.
 

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