Displaying page numbers

C

CAM

Hello,

I have a report that shows in a text box page 1 of 22 for the first page 2
of 22 on the second page etc. This works great but, I want to reset the
number of pages when there is a different policy number in my report. The
policy number is the key for reset. How do I do that? Thank you in
advance.
 
S

Stefan Hoffmann

hi,
I have a report that shows in a text box page 1 of 22 for the first page 2
of 22 on the second page etc. This works great but, I want to reset the
number of pages when there is a different policy number in my report. The
policy number is the key for reset. How do I do that? Thank you in
advance.
You can't. You need a UDF like that, which you can use as
=PageInfo([Page];[Pages];[PolicyNumber]) in your report:

Public Function PageInfo(ActualPage As Long, _
MaxPages As Long, _
PolicyNumber As Long _
) As String
PageInfo = "Calc your string."

End Function


mfG
--> stefan <--
 
F

fredg

Hello,

I have a report that shows in a text box page 1 of 22 for the first page 2
of 22 on the second page etc. This works great but, I want to reset the
number of pages when there is a different policy number in my report. The
policy number is the key for reset. How do I do that? Thank you in
advance.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:
1) Add a control to the page Footer that computes [Pages]
= [Pages]
You can make this control not visible if you wish.

2) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

3) Paste the code into the Page Footer Format event.

4) In the code, change Me!Salesman to
Me![Name of the control used to group by]
 
E

Eric_G

I've attempted to follow all the same logic, but my program bombs out on the
line:

Me!ctlGrpPages = "Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)

It also does not recognize the control box "[CtlGrpPages]" which was
inserted in the page footer. I'm using Access 2000. Any suggestions?


fredg said:
Hello,

I have a report that shows in a text box page 1 of 22 for the first page 2
of 22 on the second page etc. This works great but, I want to reset the
number of pages when there is a different policy number in my report. The
policy number is the key for reset. How do I do that? Thank you in
advance.

See:
"Printing First and Last Page Numbers for Report Groups "
http://www.mvps.org/access/reports/rpt0013.htm

Things to make sure of:
1) Add a control to the page Footer that computes [Pages]
= [Pages]
You can make this control not visible if you wish.

2) Add an unbound control to the Page Footer.
Name this control "ctlGrpPages"

3) Paste the code into the Page Footer Format event.

4) In the code, change Me!Salesman to
Me![Name of the control used to group by]
 

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

Top