473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Continuous Page Numbering for Multiple Reports

I'm having trouble continuously page numbering a large report in MS
Access. The report is made up of three separate Access reports which I
join together at the end.

In the past I have opened the reports and viewed them to see how long
they are then go in and manually type the page number and total page
number.

I am aware of the [page] and [pages] lines of code but this resets with
each new report.

I am also aware that Access runs the report once to calculate the
[pages] number then runs it again to print the number.
I was thinking of maybe 2 options:

1. Run the reports once (using VB to open them) and somehow dump down
the [pages] figure to a temporary table. Then run the reports again (or
a copy of the reports with alter page numbering code) using the figures
from the temporary table to get a total

2. Set a PageCounter.Value = 1 (in VB) on the first report and use it
to count through the pages. When the next report starts it will have
kept the total number from the last report.

If anyone has any idea how to do this help would be appreciated.

Jan 5 '07 #1
3 5095
Try this. For the first report, getting the page number on the OnFormat event
of the page header, and placing it in a global variable if it is larger
previously found (Access may format pages in a strange order.) For the second
report have a field set to the page number plus the global variable.

And so on.

Hope this helps some.

Gary

<jo*********@gmail.comwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
I'm having trouble continuously page numbering a large report in MS
Access. The report is made up of three separate Access reports which I
join together at the end.

In the past I have opened the reports and viewed them to see how long
they are then go in and manually type the page number and total page
number.

I am aware of the [page] and [pages] lines of code but this resets with
each new report.

I am also aware that Access runs the report once to calculate the
[pages] number then runs it again to print the number.
I was thinking of maybe 2 options:

1. Run the reports once (using VB to open them) and somehow dump down
the [pages] figure to a temporary table. Then run the reports again (or
a copy of the reports with alter page numbering code) using the figures
from the temporary table to get a total

2. Set a PageCounter.Value = 1 (in VB) on the first report and use it
to count through the pages. When the next report starts it will have
kept the total number from the last report.

If anyone has any idea how to do this help would be appreciated.

Jan 5 '07 #2
jo*********@gmail.com wrote:
>I'm having trouble continuously page numbering a large report in MS
Access. The report is made up of three separate Access reports which I
join together at the end.

In the past I have opened the reports and viewed them to see how long
they are then go in and manually type the page number and total page
number.

I am aware of the [page] and [pages] lines of code but this resets with
each new report.

I am also aware that Access runs the report once to calculate the
[pages] number then runs it again to print the number.
I was thinking of maybe 2 options:

1. Run the reports once (using VB to open them) and somehow dump down
the [pages] figure to a temporary table. Then run the reports again (or
a copy of the reports with alter page numbering code) using the figures
from the temporary table to get a total

2. Set a PageCounter.Value = 1 (in VB) on the first report and use it
to count through the pages. When the next report starts it will have
kept the total number from the last report.

If anyone has any idea how to do this help would be appreciated.

Presumably you have a form that is opening the reports. If
so, use a text box on the form for each report to record its
Pages value. In the reports' Close event:

Forms!theform.thetextbox = Me.Pages

Set the text box value to 0 before starting the first
report, then each report can use expressions to display the
page and pages:
=(Page + Forms!theform.thetextbox) & " of " (Pages +
Forms!theform.thetextbox)

You need to use the IsLoaded method to check that the
previous report is closed before opening the next report.

--
Marsh
Jan 5 '07 #3
jo*********@gmail.com wrote:
>I'm having trouble continuously page numbering a large report in MS
Access. The report is made up of three separate Access reports which I
join together at the end.

In the past I have opened the reports and viewed them to see how long
they are then go in and manually type the page number and total page
number.

I am aware of the [page] and [pages] lines of code but this resets with
each new report.

I am also aware that Access runs the report once to calculate the
[pages] number then runs it again to print the number.

I was thinking of maybe 2 options:

1. Run the reports once (using VB to open them) and somehow dump down
the [pages] figure to a temporary table. Then run the reports again (or
a copy of the reports with alter page numbering code) using the figures
from the temporary table to get a total

2. Set a PageCounter.Value = 1 (in VB) on the first report and use it
to count through the pages. When the next report starts it will have
kept the total number from the last report.
Joel wrote in private email:
I've got it to report how many pages are in the first report
in a text box in my form and can easily input this into my
report. I'll run the reports twice to input the 3 reports
total page numbers.

One thing, I'm only new to Access and VB (ie 1 weeks
practice) How do I open and close a report or activate and
deactivate a report. Currently I've used the below code:

Dim grppages As Integer
grppages = 0
DoCmd.OpenReport "customer", acViewPreview
grppages = Reports!customer.Pages
Me.Text4.Value = grppages

I know you mentioned having to checking if the report has
been closed inorder to open the next report but I can't seem
to figure out how to close it.
-------------------------------------------------------------------------
Please keep the correspondence in the news groups where
others can contribute alternate approaches and refinements
and where everyone can benefit from the exchange of ideas.
OTOH, private email consulting is reserved for paying
clients.

The approach I suggested did not require you to run the
reports twice. The form's code can **PRINT** the first
report, which calculates its Pages value. When that report
closes, it uses its Close event to same its Pages value back
to the form text box using code like I posted earlier. The
form then prints the second report and so on. This approach
requires minimal modifications to the reports, but it is not
particularly useful for previewing.

A different appraoch is to use an unbound main report that
only has your three reports as subreports. This way, the
page nunbering is in the main report and no longer an issue.
However, page related items are ignored in subreports so if
you rely on the Page event, or heade/ footer sections, you
will have to make some potentially significant changes to
the three reports.

--
Marsh
Jan 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sabine Oebbecke | last post by:
Hi there, Need some help again ... I have a continuous form which shows the attendees of a competition as per their placing in the competition. So, the first record is the winner, the second...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
2
by: Elasho | last post by:
I have a report that groups data on an Area, the report is set to force a new page for each Area within the report. Each Area will have 1 or more pages. Is it possible to make the page...
1
by: Kadir | last post by:
Hi All, I have a problem in printing reports. I have a dot matrix printer. I want to print a report that varies in height each time according to the details. If I set the page to A4 it goes onto...
1
by: Simon | last post by:
Dear reader, Most of the reports have a page numbering as Page x of nn, starting at the first page 1 (one) to the last page nn. But know I need to start with Page 1 of nn for each...
1
by: Stinky Pete | last post by:
Evening, I have a form that uses 5 pages (it's an electronic copy of the paper version) we are going to use for manufacturing non conformances and product deviations. In case your wondering,...
5
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background...
0
by: ARC | last post by:
Hello all, What's the secret for continuous reports in access, such as continuous feed labels or receipt printer paper? I'm unsure how access works with the top / bottom margins, and the page...
4
by: bhughes2187 | last post by:
I am trying to sequentially place page numbers across multiple reports. Basically what I am trying to do is on the first report, which has 3 pages, the first page is page one...after cycling through...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.