Restart page numbering in a report

Tophan

Registered User.
Local time
Today, 17:48
Joined
Mar 27, 2011
Messages
389
I was searching for a solution to this problem and found a thread called "Changing page numbers?" from 2012 but it is not clear if the problem was solved and I am stuck; below is the link

http://www.access-programmers.co.uk/forums/showthread.php?t=235762&highlight=page+numbering

I have two issues with my report. The first is the page number. The print control on the correlating form allows the user to print a range of reports based on the TransmittalID number. TransmittalID #1 is a 2 page report and #2 is a single page report but when I choose print from ID 1 to 2 the page numbering says page x of 3 instead of page 1 of 2 and 2 of 2 for ID #1 and page 1 of 1 for ID #2. Following along the thread above I managed to reset the page numbers to restart at 1 for each page but that is as far as I got. I'm not sure where to enter the code that was provided.

My second problem is that the report footer contains a signature line; however, printing a range is resulting in this only showing on page 3. How do I set this that for each new ID# start a new report. I've tried force new page, inserting page breaks but no luck

Any suggestions are greatly appreciated
 
Last edited:
It's best to focus your thread on one problem. I'm going to look into your first issue and I'll need you to upload the db. Include some test data.
 
Hi again :)

Attached is the database. The report is RPTDwgTransmittal. Info for this report comes from TBLTransmittal and QRYDwgTransmittal.

I can issue drawings to several subs in one day which is why I would prefer to be able to print a series of transmittals at a time instead of 1 by 1. I managed to get the page numbering to restart but as i said in my earlier post, I am not sure where exactly the second set of code goes.
 
Last edited:
Hello :)

Is the first part always going to be exactly 2 pages and 1 page for the second?
 
No. It depends on how many drawings need to be issued. I deliberately selected several drawings for the first transmittal to force it onto a second page.

So from the test info I have entered, I have issued drawings to two separate sub-contractors - this first sub was issued 29 drawings showing on 2 pages and the second sub was issued 9 drawings showing on 1 page
 
I just realised that even though I have a criteria in my query - Between [TransmittalID] And [TransmittalID] - it's not prompting me to enter the transmittal ID numbers.

Fixed it...it should read Between [From Transmittal No] And [To Transmittal No]
 
I didn't have time to do it myself and I remembered there's a piece of code that already does this so I've included in your db. See attached.

By the way, when was the last time you Compacted and Repaired your db? Your file shrunk from 7MB to just under 2MB after I did a compact and repair, that's a reduction of over over 50%.
 
Last edited:
:eek: oh wow! thank you very much!!

My second problem is the signature line in the report footer. When I select a range of transmittals, Access reads it as one report therefore only 1 report footer therefore the signature line only shows on the last page.

I am trying to find a way to show the signature line on the last page of EACH transmittal. If I put it in the page footer it will show on each page which I don't want
 
Ok, that's what the Group Footer is for. If there's something you want to appear at the last page of every group, you put it in the group's footer.
 
Thank you! You have been a great help and my database is almost finished thanks to your help.

I was just looking at the code of the page number...that's some code! Reading it line by line to understand it so I can use it again if I have to.

Thanks again and have a great night.

(BTW...could you remove the db from your post?)
 
It's in the link that you sent, I've just never used it. I feel there should be less code to accomplish the same. Might have to look into that later.

Happy developing!
 
If you put a Header and Footer on your report For ID and the signature in the Footer.

The idea here is the only when the ID Footer is encountered that the Page Footer controls are visible ontherwise the ID header sets the Controls to being invisible.

On the ID Header (if I remember correctly, you have to make each control visible = False on the Footer and on the ID Footer then make the footer control visible. At the same time set the Page No on the Report to Page 2 and after that Set the Page = 0 and increment on the ID Header.

Simon
 
vbaInet - is there any chance you could just post the code snipped that does the renumbering? That seems like a useful procedure to have on-hand.
 
It's in the link in the Original Post, look for post #15.
 

Users who are viewing this thread

Back
Top Bottom