View Full Version : Page Numbering
RexesOperator 05-27-2007, 03:42 PM This is actually a repost from the queries, since this issue deals more with the report output, now that the query is working.
I've used a page break on the group footer to separate each record, is there anyway to get the page numberings to start over with each new record? Right now, if I have more than one record in the parameter list, the page numbering starts with the 1st page and then continues through all the records rather than resetting to page one at the beginning of a new record in the list.
ie record 10110 has 3 pages, 10519 has seven. The page numbering begins at page one and continues to page 10. I want it to restart at page one for record 10519.
boblarson 05-27-2007, 03:49 PM I think you want this info here:
http://support.microsoft.com/kb/209215
RexesOperator 05-27-2007, 03:56 PM This is why I like the learning environment in the forum better than a course. That's exactly what I needed.
I still think Anaheim will win.
boblarson 05-27-2007, 04:04 PM I still think Anaheim will win.
You're probably right - they're doing really well right now.
RexesOperator 05-27-2007, 04:31 PM You're probably right - they're doing really well right now.
Everyone is, since the series doesn't start until Monday!:D
This is where you really earn your pay (so to speak).
I've tried fighting my way through the Microsoft example for page number at the bottom of the page, and so far, I have this:
(I should explaing the report is grouped on COMPANYNAME)
Private Sub COMPANYNAMEFooter3_Format(Cancel As Integer, FormatCount As Integer)
Dim page As Integer
page = 1
End Sub
The response I get is Microsoft can't find the macro page.
Is there something subtle going on that I missed?
boblarson 05-27-2007, 04:55 PM That sub name doesn't look like an Access created one. Did you try to create the event yourself?
RexesOperator 05-27-2007, 05:05 PM Yes I did.
I sort of assumed (I know assume makes an ass of u and me) the format and just substituted the name of the group.
RexesOperator 05-27-2007, 05:05 PM By the way - I hope you get to enjoy your holiday.
boblarson 05-27-2007, 05:18 PM Yes I did.
I sort of assumed (I know assume makes an ass of u and me) the format and just substituted the name of the group.
That would do it. Just remember, in Access you can't really create your own events. Access handles those and you have to select them and not try typing them yourself.
RexesOperator 05-27-2007, 06:34 PM You would think this would be an option when the wizard is building the report. Now I'm getting frustrated. I have even tried the help file (which surprisingly was clearer than the support page)
I changed the name of the footer to FooterCOMPANYNAME, so the code, now looks like this:
Private Sub FooterCOMPANYNAME_Format(Cancel As Integer, FormatCount As Integer)
Dim page As Integer
page = 1
End Sub
If I use the "AfterSection" option, the page header gets chopped off onto a page by itself, and the pages still aren't numbering correctly. I tried several variations on the theme, but I must be missing something obvious.
(At least I now know I had to make a macro - the support page didn't specify that, but the help file did. Go figure.)
boblarson 05-27-2007, 06:46 PM Do you wanna try uploading your db so I can take a stab at it?
RexesOperator 05-27-2007, 06:53 PM FINALLY got it working.
As a last resort I deleted the page numbers and reinserted them. Then I went back through all the steps and it works.
Thanks for your help (again - do you ever get tired of hearing that?).
Enjoy your holiday.
boblarson 05-27-2007, 07:07 PM Thanks for your help (again - do you ever get tired of hearing that?).
Of course not, why do you think I keep on doing it? :)
Enjoy your holiday.
Thanks!
Fifty2One 05-28-2007, 05:51 AM You would think this would be an option when the wizard is building the report. Now I'm getting frustrated. I have even tried the help file (which surprisingly was clearer than the support page)
I changed the name of the footer to FooterCOMPANYNAME, so the code, now looks like this:
Private Sub FooterCOMPANYNAME_Format(Cancel As Integer, FormatCount As Integer)
Dim page As Integer
page = 1
End Sub
If I use the "AfterSection" option, the page header gets chopped off onto a page by itself, and the pages still aren't numbering correctly. I tried several variations on the theme, but I must be missing something obvious.
(At least I now know I had to make a macro - the support page didn't specify that, but the help file did. Go figure.)
You cant Dim page As Integer because Access already has [Page] and [PAGES] reserved and taken. You will have to make a new variable to fool around with and then have [Page] equal that or [NewPageNo] equal [Page] with the math...
Slight off topic but anyway here is code for a text box that types Continued on next page on each page of a form except the last one...
=IIf([Page]<[Pages],"Continued next page","")
RexesOperator 05-28-2007, 08:07 AM That's what I finally figured out once I got the macro working. At least now I know what to do.
It seems to me this should be an option that the wizard would handle. Oh well.
Assume (and Access for that matter) makes an ass of u and me!
|
|