Loop numbering Sequence

D

David

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

Anyone have any ideas how to go about this or even a direction to point m
in? I am thinking that I will have to use VBA behind my report to driv
this function...I would like for it to run a control

I tried one suggestion, but when you skip to the end of the report and go back to page one, the numbering changes. Also, this suggestion did not run from a control

Private Sub Report_Page(
Static pgNumber As Intege

pgNumber = pgNumber +

Me.ForeColor = vbBlu
Me.FontItalic = Tru
Me.FontBold = Tru
Me.CurrentX = 200
Me.CurrentY = 1
Me.Print CStr(pgNumber

If pgNumber >= 7 Then pgNumber =
End Su

Any help would be greatly appreciated

Thank you in advanc

David
 
R

RobFMS

David

When you create a report from the Report Wizard, at the footer, it will give
you the Page X of Y.
Substitute this piece of code in its place: =([Page] Mod 7)+1

What this will do is number the pages 1 through 7. Now, there is one small
glitch. The first page starts at 2 but every other succession of 7 pages are
numbers 1 through 7.

I have to step out for a short while but hopefully this will get you going
down the right path. I will see what I can do to get it to start at page 1
instead of page 2.

HTH

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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, 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...I would like for it to run a control.

I tried one suggestion, but when you skip to the end of the report and go
back to page one, the numbering changes. Also, this suggestion did not run
from a control:
 
M

Marshall Barton

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, 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...I would like for it to run a control.

I tried one suggestion, but when you skip to the end of the report and go back to page one, the numbering changes. Also, this suggestion did not run from a control:

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


Just to refine Rob's text box expression

=((Page - 1) Mod 7) + 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top