can't print in landscape

  • Thread starter Thread starter cdolphin88
  • Start date Start date
C

cdolphin88

Hi,

I design a report in access and I put in the setup page as landscape..
then I use VB to print out the report..
The problem is I don't know why, it keeps printing in portrait and in 2
pages, instead of landscape...

Can I force to print in landscape? I try this line of code
Printer.Orientation = vbPRORLandscape but it doesn't work...

here's part of the code that I used in VB to print the report

Set app2 = New Access.Application

constrDBName = strdatasource
strReportName = "Rptlisting"

With app2
'Open DB
..OpenCurrentDatabase constrDBName

..Visible = True

'Open report to preview
..DoCmd.OpenReport strReportName, acViewPreview

'Print report
' Printer.Orientation = vbPRORLandscape
..DoCmd.OpenReport strReportName, acViewNormal

End With

Set appAccess = Nothing

Cheers!

Claudi
 
Try:

First, make sure that your report is set to use the default printer rather
than a specific printer. Set it to landscape orientation. In the main,
that should solve it. But a couple of other things to also do:

1.) Turn off Name Auto Correct in the Tools -> Options

2.) You can also add the line of code to set Access' use of the default
printer as landscape as follows:

app2.printer.orientation = 2 'vb doesn't know ACPRORLandscape

but set this line of code BEFORE you open the report in preview, not just
when you print it out.
 
Hi SA

I did everything that you mentioned, but it still print 2 pages, and in
portrait...

:(

Any suggestions?

Cheers!

Claudi
 
Back
Top