PageHeaderSection_Format doesn't fire when moving backwards?

J

Joseph Greenberg

I am using the following code to adjust my left printer margin a quarter
inch based on odd or even pages:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If Me.Page = 1 Then
MoveMargin = 360
ElseIf Me.[Page] Mod 2 = 0 Then
MoveMargin = -360
Else
MoveMargin = 360
End If
ChangeMargins
End Sub

Public Sub ChangeMargins()
Printer.LeftMargin = Printer.LeftMargin + MoveMargin
End Sub

This code works just fine when I preview the report and go forward. However,
when I move backward in the report, the PageHeaderSection_Format event
doesn't fire. How can I get the code to whenever I switch pages? And I will
be printing this report as well.

Thanks.
 
Top