View Full Version : Page Headers


niall
12-02-2002, 07:04 AM
Hello everyone

I am inserting OLE objects into my report. Can I have a different page header where there is an OLE? Or can I have different page headers for odd and even pages?

Thanking you in advance
Niall

Stuart Heath
12-06-2002, 03:01 AM
In the on format event of your page header include code based on the fields you want to change your header on.

eg.

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page / 2 = Int(Me.Page / 2) Then
Me!Label1.Caption = "Even"
Else
Me!Label1.Caption = "Odd"
End If
End Sub

Will change the contents of you label based on page count.

You can use the same principle on your ole control.