C
Colin Chudyk
Hello,
With Me.Printer
I am making changes to the printer object in the Open event of my report.
The code is like this:
.PaperSize = rstReport!rpt_PaperSize
.Orientation = rstReport!rpt_PageOrient
.DefaultSize = False
.ItemSizeWidth = sngReportWidth
.ItemsAcross = 1
End With
However, once the report has loaded, it retains the page setup settings from
the previous run (or simply offers unpredictable results). But this can
easily be fixed by simply opening the Page Setup dialog and clicking OK. The
settings I made in code appear in the Page Setup dialog, and when I click OK
they are applied.
How can I APPLY the settings in my code? Is there some method I can call
that will offer the same function as clicking the OK button in the Page
Setup dialog? I can't find it anywhere...
This also seems to be the case when setting the Width property of the Report
object itself from the Open event. By the way, this app is going to run as
an MDE so there is no way I can open anything in design view to set
properties..... although that would solve a lot of problems!
Thanks,
Colin
With Me.Printer
I am making changes to the printer object in the Open event of my report.
The code is like this:
.PaperSize = rstReport!rpt_PaperSize
.Orientation = rstReport!rpt_PageOrient
.DefaultSize = False
.ItemSizeWidth = sngReportWidth
.ItemsAcross = 1
End With
However, once the report has loaded, it retains the page setup settings from
the previous run (or simply offers unpredictable results). But this can
easily be fixed by simply opening the Page Setup dialog and clicking OK. The
settings I made in code appear in the Page Setup dialog, and when I click OK
they are applied.
How can I APPLY the settings in my code? Is there some method I can call
that will offer the same function as clicking the OK button in the Page
Setup dialog? I can't find it anywhere...
This also seems to be the case when setting the Width property of the Report
object itself from the Open event. By the way, this app is going to run as
an MDE so there is no way I can open anything in design view to set
properties..... although that would solve a lot of problems!
Thanks,
Colin