Page Event [Access 2003 VBA Language Reference]
The Page event occurs after Microsoft Access formats a page of a report for printing, but before the page is printed. You can use this event to draw a border around the page, or add other graphic elements to the page.
Private Sub Report_Page()
To run a macro or event procedure when this event occurs, set the OnPage property to the name of the macro or to [Event Procedure].
The NoData event occurs before the first Page event for the report.
The following example shows how to draw a rectangle around a report page by using the Line method. The ScaleWidth and ScaleHeight properties by default return the internal width and height of the report.
Private Sub Report_Page() Me.Line(0, 0)-(Me.ScaleWidth, Me.ScaleHeight), , B End Sub
Applies to | Report Object