Print pages 1-2 of a report

K

k.roberts

I have created a report and set up a command button with
DoCmd.OpenReport "r_R&SEnq_SF_rep_weekly", acViewNormal, , ,
acWindowNormal behind it which automatically prints the report to
default printer.

Great - but I only need to print the first 2 pages of the report (for
some reason even though I only have 2 subreports on it - each on one
page), they are repeating.

If someone could advise what code I need to put in to print only pages
1 & 2 that would be great - even better, if someone knows why the
subreports are repeating then that would be cool.

Many thanks.
 
J

John Spencer

Usually the problem is that you have too much detail in the query for the
main report. So that query needs to return fewer records either by
eliminating the subordinate tables or by using Distinct in the query (set
the unique values property of the query to Yes).

So you need to find a way to return only One record for the main query.

You could add code to your report that would cancel pringint all subsequent
pages, but that is the hard way.
 

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