Number Pages in loop sequence

D

David

I have a report that I need to have the numbers 1-7 on. It does not matter how many pages are in the report. Each page must be numbered sequentially 1-7 tnen loop, return to 1 to start the numbering process again

Anyone have any ideas how to go about this or even a direction to point me in? I am thinking that I will have to use VBA behind my report to drive this function..

Any help would be greatly appreciated

Thank you in advanc

David
 
L

Luiz Cláudio

Hi David,

you can write some code in Report_Page event:

Private Sub Report_Page()
Static pgNumber As Integer

pgNumber = pgNumber + 1

Me.ForeColor = vbBlue
Me.FontItalic = True
Me.FontBold = True
Me.CurrentX = 2000
Me.CurrentY = 15
Me.Print CStr(pgNumber)

If pgNumber >= 7 Then pgNumber = 0
End Sub


Luiz Cláudio C. V. Rocha
São Paulo - Brazil



David said:
I have a report that I need to have the numbers 1-7 on. It does not
matter how many pages are in the report. Each page must be numbered
sequentially 1-7 tnen loop, return to 1 to start the numbering process
again.
Anyone have any ideas how to go about this or even a direction to point me
in? I am thinking that I will have to use VBA behind my report to drive
this function...
 
Top