Docmd.PrintOut - can I force landscape format?

  • Thread starter Thread starter Dorian
  • Start date Start date
D

Dorian

I have a button on my form to allow printing of the current record. Here is
the code:

DoCmd.Echo False
If Me.Dirty Then Me.Dirty = False
Me.FormHeader.Visible = False
DoCmd.PrintOut acSelection
Me.butPrint.SetFocus
Me.FormHeader.Visible = True
DoCmd.Echo True

My problem is that it always prints in Portrait and the rightmost part of
the form goes to a second page. Is there any way to force it to print in
Landscape format? I don't see such a parameter on the PrintOut method.

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Forms really aren't intended to be printed: that's what Reports are for.

You'd be best off creating a report that shows the appropriate information,
then printing it.
 
All I had to do was go into design view on the form and do File--Page SetUp
and set the format to Landscape. Now it works perfectly.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Back
Top