My tests in earlier versions of Access didn't seem to know the value of Page
unless there was a control. Testing now in Access 2002, you are correct. I
created a new report with no controls bound to [Page] and added this code
which worked correctly.
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If Page = 1 Then
Me.FontSize = 24
Me.ForeColor = vbRed
Me.Print "PAGE ONE"
End If
End Sub
Thanks for the clarification.
--
Duane Hookom
MS Access MVP
--
Ofer said:
I don't think you need to.
-----Original Message-----
Clarification on Ofer's code which should be in the On Format event of the
Page Footer section:
Select Case Me.Page
Case 1
Me.Information="aaaa"
Case 2
Me.Information="bbbb"
Case else
Me.Information="ddddd"
End Select
You must have a control bound to [Page] in order to get this to work.
--
Duane Hookom
MS Access MVP
On the format property of your footer you can create a
selection on your page number
select me.page
case 1
information="aaaa"
case 2
information="bbbb"
case else
information="ddddd"
end select
-----Original Message-----
I need to print certain information in the footer on the
first page of my
report, and somewhat different informationin the footers
on subsequent pages.
I can't figure out how to do this. I'm not highly
trained, but I have learned
a bit about using VBA to format reports. Can anyone give
me any pointers with
this?
Thanks in advance
Vaughan
.
.