Print Landscape

  • Thread starter Thread starter GeorgeMar
  • Start date Start date
G

GeorgeMar

I have a button the prints the form in focus but I cannot
get the printer to print landscape. The form is too wide
for portrait.

Here is the what I am using in a print function and it is
not working.

Printer.Orientation=acPRORLandscape
DoCmd.PrintOut

It always comes out portrait.

many thanks
george
 
Tim

I am actually trying to print a form in focus, not a
report.

george
-----Original Message-----
Open the report in design mode. In File > Page Setup,
select landscape orientation, then save the report. Any
changes to Page Setup are saved with the report as the
default setup.
(You might have to make some other small change to the
report for this to actaully save.)
 
Oh sorry. I should read posts a little closer.

Hmm, never tried printing forms from code. One solution would be to create a report to that simulates the form. More work, but offers the flexibility you need.

Tim
 
Oh sorry. I should read posts a little closer.

Hmm, never tried printing forms from code. One solution would be to create a report to that simulates the form. More work, but offers the flexibility you need.

Tim
 
I have found an answer to getting a form to print in
landscape. But I now need a little more help.

Here is how it works.

The form can be changed to print landscape just like
reports.

In design mode, go to File>PageSetup>Page and change to
landscape and Voila! And the setting remains.

I did this through VBA and it too works. In a function,
put the following lines:

Forms!formname.form.printer.orientation=acPRORLandscape
Docmd.PrintOut

and again Voila!

Now for the piece de resistance, I want to do it for any
form that is in focus and it is not working. Can someone
help? here is a sample code that I am trying and the eval
portion is not working

dim frm as form
dim strForm as string

set frm=Screen.ActiveForm
strForm=frm.name

eval("Forms!" & strForm & ".form.Printer.Orientation=2")
'2 for landscape
docmd.printout

There are no errors but the eval() is ignored.

Many thanks
george
 
Back
Top