Re: Refreshing Report to Accept Printer changes
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Mon, 7 Aug 2006 09:03:28 +0800
So setting the orientation works, but setting the paper size does not?
You could try swapping the commands around (PaperSize first) to see if
setting the orientation causes it to wake up to the paper size.
I know I have set the margins and orientation using this approach, but I
can't recall trying to set the paper size. It may be that you need to set
the PaperSize before you open the report, i.e. Report_Open is too late.
Experiment and see if that makes a difference.
The alternatives are not attractive. If you've never worked with PrtMip,
it's a bit of a dog's breakfast. See:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccessdev/html/ODC_MicrosoftOfficeDeveloperForumControllingYourPrinterinMicrosoftAccess.asp
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"rmcompute" <rmcompute@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:250AF1B6-3C80-4DE3-BA44-A13BD5212509@xxxxxxxxxxxxxxxx
I have Access 2003 and for now I am running the report by just clicking on
it. The code in the Open event is as follows:
Me.Printer.Orientation = acPRORLandscape
Me.Printer.PaperSize = acPRPSLegal
After the report comes up it is in Portrait with Letter size. If I click
File/Page Setup ... and select the Page tab, it is set as follows:
Orientation = Landscape
Size = Legal(8.5 x 14 in)
So obviously the code is working. It is just not changing the report
until
I click OK.
Is there a VBA command to issue after the above commands which would be
the
equivalent, or perhaps some report refresh ?
"Allen Browne" wrote:
In Access 2002 or 2003, that should work in Preview without needing to go
to
design view.
It won't work if you have opened in acViewNormal, i.e. printing without
preview.
"rmcompute" <rmcompute@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:87DD5126-AF16-4FE9-8D97-43E564D26AE2@xxxxxxxxxxxxxxxx
I was able to successfully change the Orientation and Page size in the
open
event of a report, however, it does not reflect in the report display
unless
I go into design mode and click OK. Is there a command that can be
issued
after the commands listed below, which will make these changes take
effect
without having to go into design mode and click OK ?
'Me.Printer.Orientation = acPRORPortrait
'Me.Printer.PaperSize = acPRPSLetter
.
- References:
- Re: Refreshing Report to Accept Printer changes
- From: Allen Browne
- Re: Refreshing Report to Accept Printer changes
- Prev by Date: Re: Counting Checkboxes based on another column in report footer
- Next by Date: Using relative file path in reports
- Previous by thread: Re: Refreshing Report to Accept Printer changes
- Next by thread: Re: Chart with tow link feilds
- Index(es):
Relevant Pages
|