Unique numbering of pages in a report

  • Thread starter Thread starter Keith Henderson
  • Start date Start date
K

Keith Henderson

I have a delivery note report, but I need to have a unique
number in the top right hand corder for each one. I also
need the number to have leeding zeros, and a way to store
the last number so that when I run the report the next day
is dosn't start back at 0001.

Can anybody help?
 
I'd suggest a table that stores your "last unique number" and a "highest
page of last report", and you add them together in the Report's Close event
to make a new "last unique number". Use a DLookup in the Open event to
obtain the last unique number and save it in a variable in the Report's
module, in the Page Header's Format event, add it to the intrinsic Page
variable on each page and use the Format function or just the Format
property of the text box to force the lead zeroes.

In the Report's Close event, open a Recordset on this "Info" table, and save
the new "last unique number".

Larry Linson
Microsoft Access MVP
 
Back
Top