Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Page number decimals

Status
Not open for further replies.

nosajld

Programmer
Oct 11, 2010
16
US
Greetings -

I have the following formula:

if pagenumber = totalpagecount then
'Page 1 of ' & totalpagecount
else
'Page ' & PageNumber +1 & ' of '& Totalpagecount

The formula works fine for what I want it to do with one exception. The 'PageNumber' and 'TotalPageCount' items print with 2 decimal places each. I've tried the Round() and Fix() to no avail per the example below.

if pagenumber = totalpagecount then
'Page 1 of ' & fix(totalpagecount,0)
else
'Page ' & fix(PageNumber +1,0) & ' of '& fix(Totalpagecount,0)



Any assistance is greatly appreciated.

Thank you!

Jason
 
Not sure what you are trying to do
but to get rid of decimals use


if pagenumber = totalpagecount then
'Page 1 of ' & totext(totalpagecount,0,"")
else
'Page ' & totext(PageNumber +1,0,"") & ' of '& totext(totalpagecount,0,"")
 

thanks - I will try that.

Essentially what is happening I need the page footer to be the first page of the report - so when printed out it is listed as 'page 1 of x.' On a major time crunch and don't have the time to go back and make major changes so need a quick fix.

Thank you!
 

Sorry - Report footer not page footer. :) It worked. Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top