Docmd.PrintOut - can I force landscape format?

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".
 
D

Douglas J. Steele

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.
 
D

Dorian

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".
 

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