Re: Refreshing Report to Accept Printer changes



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


.



Relevant Pages

  • Re: Bonnie Bitch Disputes Gay Priest Data -- More To Follow.
    ... >> Oh, well, it seems Bonnie Bitch has put me on notice, stalking me ... > that behavior does not necessarily indicate orientation, ... > found no homosexuals among the ranks of sexual abusers of children, ... was detailed within the report. ...
    (alt.religion.christian.roman-catholic)
  • Re: Bonnie Bitch Disputes Gay Priest Data -- More To Follow.
    ... >report on this issue was: "A Report on the Crisis in the Catholic ... mistake that Mary-Hugh likes to make -- equating the behavior as proof ... that behavior does not necessarily indicate orientation, ... "The Nature and Scope of the Problem of Sexual Abuse ...
    (alt.religion.christian.roman-catholic)
  • Re: 2003 server in a NT4 Domain.
    ... Herb here are the results of the commands you gave me. ... It looks like Auth against the PDC is working as the user account used ... domain and was able to see the shared resources on the 2003 server. ... >Report exact error messages. ...
    (microsoft.public.win2000.active_directory)
  • Re: message: Zoom not available now.
    ... As Rick Brandt wrote... ... For some reason commands that change the report's window size and/or the ... zoom level cannot be called in the Open event of the report itself. ... That code must be in the form/button code that "calls" the report... ...
    (microsoft.public.access.reports)
  • Re: Help!!!
    ... Kill and Dir commands. ... >> Will it suffice to delete the downloaded file after you've ... >> the existance of the downloaded file before you run the report. ...
    (microsoft.public.access.formscoding)