how to generate a sequential number on a report?

J

JFC

hello devs,

I have a "simple" challenge:

Is it possible to generated a sequential number on a report for each page,
starting on a number entered by the user?

Note: If possible, this number should not be recorded in the database, only
generated temporaly for the report.
 
F

fredg

hello devs,

I have a "simple" challenge:

Is it possible to generated a sequential number on a report for each page,
starting on a number entered by the user?

Note: If possible, this number should not be recorded in the database, only
generated temporaly for the report.

Are you talking about starting the Page Number at a different value?
Code the Report Header Format event:
Me.[Page] = InputBox("Starting Page Number?", ,1)

If you are talking about a different value to be incremented on each
page, then add an unbound control to the page header.
Leave it's control source blank.
Name this control "Increment"

Add another unbound control to the Report Header.
Set it's control source to:
=[Start at what Number?]
Name this control "StartAt"
You can make it not visible.

Code the report's Report Header Format event:
Me![Increment] = Me![StartAt]-1

Code the Report's Page Header format event:
Me![Increment] = Nz(Me![Increment], 0)+1
 
Top