Getting Orientation of report

D

Don

How do you get the orientation of a report(Portrait or Landscape) though
code? I tried the code below but it always gives me zero.

Thanks

Don

Dim rpt As Access.Report
Dim iOrientation = rpt.Orientation

Set rpt = Reports("Report1")
iOrientation = rpt.Orientation
 
D

Don

I had wrote down the incorrect syntax. This is how it should read.

Dim rpt As Access.Report
Dim iOrientation as integer

Set rpt = Reports("Report1")
iOrientation = rpt.Orientation
 
Top