Printing wrong pages

V

Violaine

Hi,
Simple question, but I don't know why it's doing that and how I can solve
the issue.

When I print a report, using the standard printing icon, I am selecting
specific pages - let's say pages 9 & 10, but it will print out pages 2 & 3.
??
Interestingly, the printed pages said in the footer "page 9" and "page 10"…
Was that something I did or is this a small bug?

Thanks for your help
 
A

Allen Browne

This can happen for several reasons, e.g.:

a) Something in the report is changing the value of the report's Page and
Pages, e.g. code that says:
Me.Page = 1

b) The controls that show this are not actually tied to Page.

c) You have code that is hiding or repeating sections of the report. This
can cause some weird results, such as "Page 9 of 7."
 
V

Violaine

Hi Allen,

Thanks for your answer and let me know you are very lucky to live in
beautiful Perth.

Regarding your answer, I have checked as per your suggestions:

a/Code
Option Compare Database

Private Sub Report_Close()
DoCmd.Close acForm, "ParamForm"
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "ParamForm", , , , , acDialog
End Sub

Private Sub Report_Page()

End Sub

b/ Can you explain a little bit more "The controls that show this are not
actually tied to Page": what should I do to tie them to the page?

I am trying to figure out what would be the easiest way to fix this issue...

Thanks
 
A

Allen Browne

The code you listed won't cause the problem (a).

Re (b), you normally show the page with a text box bound to:
=[Page]
It's worth checking if the Control Source is something else.

Another possibility is that there's a problem with the printer driver. Since
Access uses the metrics from the printer driver to calculate the report
layout, if the metrics are bad it can affect the outcome. If this were the
case, the problem would be solved if you tried a completely different kind
of printer.
 

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