Custom Page Number Label

crhodus

Registered User.
Local time
Today, 01:47
Joined
Mar 16, 2001
Messages
257
I'm trying to create a label on a report that will display:
"Page 1 of 2" if the page number is odd or "Page 2 of 2" if the page number is even.

I'm having problems just figuring out how to reference my lable and assign it a value.

I've tried: Me.lblPageNum.Report.Caption = "Hello"
but this returns an error when the report is run. It's been a while since I've worked with VBA. Can someone tell me how I can reference this lable and assign the caption a value?

Thanks,
crhodus
 
Why not create a new text box in the page Footer section of the report and stick this in the Control Source of the text box...

Code:
="Page " & [Page] & " of " & [Pages]
:rolleyes:
 
Normally, this is what I would do, but this report is being used as a mail merge letter. The mail merge letter is 2 pages (the details section is two pages long). After the first complete letter is printed, I need to "reset" the page number back to 1 for the next letter that is created in my details section.

Thanks,
crjunk
 
Why not hard code the Page 1 of 2 or Page 2 of 2 where it would hit for each page since you know each letter will be two pages? Or at the bottom of the last page [Report Footer] just end it with a hard coded Page 2 of 2.
 
Thanks for the info. That will probably be the easiest thing to do.
 

Users who are viewing this thread

Back
Top Bottom