If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Page Footer Sum
Use the same technique as in the web page, but instead of adding the Amount,
just add 1. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "zyus" wrote in message ... Thanks for the response but what i meant is i want to put a number to each record in the page...where each page will start from 1 to 10 for example...following page will start from 1...its nothing to do with the amount as formulated earlier... Normally i put control source =1 and either i tag as running sum over all or over group. For this case i hv 100 records and each page will have a number starting from 1 . Ex..page1 No Name Amount 1 Mr A 100 2 Mr B 100 3 Mr C 100 Sum Page Footer 300..(your code) Page2 No Name Amount 1 Mr D 200 2 Mr E 100....and so on The one that i'm trying to formulate is the No...so it will start from 1 Hope you got my msg... "Allen Browne" wrote: If you have the code in that article working, you are already accumulating the amount in the variable curTotal. To display it add an unbound text box to the form's Detail section, and set these properties: Name txtAmountPageRS Running Sum no Format Currency Then add this line to the Detail Section's Print event (after the other one): Me.txtAmountPageRS = curTotal "zyus" wrote in message ... How to put running sum that will start from number one for every page... I've tried to put running sum as over group only but it cant be done...its still run over all pages. TQ "Allen Browne" wrote: See: Reports: Page Totals at: http://allenbrowne.com/ser-11.html The article explains how to collect the total programmatically in the report's events, and place it into the page footer. "Pedro Costa" wrote in message ... I have a report with about 50 pages, and what i'm trying to do is the sum in every page of the report. Detail Section Field 1 Field 2 Field 3 Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4]) Page Section Sum of all SubTotals ??? No matter what i do or i get the #error message or the text box gets invisible |
#12
|
|||
|
|||
Page Footer Sum
I have the same scenario as Mr. Costa. I have tried all the steps that you
gave him. I did not get the exact error messages, but entered all the information anyway. I get the following error message: If Me is a new macro or macro group, make sure you have saved it and that you have typed its name correctly. What does this mean? I do not know anything about macros, and really did not understand the code that I typed in, but tried it anyway. Is there no other way to get a page total? This seems like a lot of code for what should be a standard task. In case I typed it wrong, this is how my event procedure looks: Option Compare Database Private Sub GroupFooter14_Format(Cancel As Integer, FormatCount As Integer) Option Explicit 'Optional, but recommended for every module. Dim curTotal As Currency 'Variable to sum [Amount] over a Page. End Sub Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) If PrintCount = 1 Then curTotal = curTotal + Nz(Me.Amount, 0) End Sub Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) curTotal = 0 'Reset the sum to zero each new Page. End Sub "Pedro Costa" wrote: I have a report with about 50 pages, and what i'm trying to do is the sum in every page of the report. Detail Section Field 1 Field 2 Field 3 Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4]) Page Section Sum of all SubTotals ??? No matter what i do or i get the #error message or the text box gets invisible What am i doing wrong? Thanks PC |
#13
|
|||
|
|||
Page Footer Sum
Mr. Browne,
I replied to the wrong part of this conversation before. I have done everything you told him to do . I do not get any errors now, but nothing is subtotaled. Am I supposed to put something in the unbound text box? Was "PageTotal" supposed to go in the text box, or the label? What is supposed to go in the text box, or am I just supposed to leave it as "unbound"? Thank you, Jeannie "Allen Browne" wrote: Use Nz() to specify zero for null: If PrintCount = 1 Then curTotal = curTotal + Nz(Me.Amount,0) -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Pedro Costa" wrote in message ... Now it gives me a "RunTime Error 94 - Invalid use of null" in the code line "If PrintCount = 1 Then curTotal = curTotal + Me.Amount" "Allen Browne" wrote: Set the On Format property of the Page Header section to: [Event Procedure] Click the Build button (...) beside this. Access opens the code window. Put the line of code in there, in between the lines "Private Sub ..." and "End Sub". Similarly, the other lines of code have to go into the code window. "Pedro Costa" wrote in message ... Thanks for your reply, but i get the message : "Microsoft Access cant find the macro 'curTotal=0'." "Allen Browne" wrote: See: Reports: Page Totals at: http://allenbrowne.com/ser-11.html The article explains how to collect the total programmatically in the report's events, and place it into the page footer. "Pedro Costa" wrote in message ... I have a report with about 50 pages, and what i'm trying to do is the sum in every page of the report. Detail Section Field 1 Field 2 Field 3 Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4]) Page Section Sum of all SubTotals ??? No matter what i do or i get the #error message or the text box gets invisible |
#14
|
|||
|
|||
Page Footer Sum
Boy, to I feel stupid!! This conversation occurred in 2006!!
Is anyone out there who can help with this in 2009? I am using Access 2007. Thank you!! "Jeannie" wrote: I have the same scenario as Mr. Costa. I have tried all the steps that you gave him. I did not get the exact error messages, but entered all the information anyway. I get the following error message: If Me is a new macro or macro group, make sure you have saved it and that you have typed its name correctly. What does this mean? I do not know anything about macros, and really did not understand the code that I typed in, but tried it anyway. Is there no other way to get a page total? This seems like a lot of code for what should be a standard task. In case I typed it wrong, this is how my event procedure looks: Option Compare Database Private Sub GroupFooter14_Format(Cancel As Integer, FormatCount As Integer) Option Explicit 'Optional, but recommended for every module. Dim curTotal As Currency 'Variable to sum [Amount] over a Page. End Sub Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) If PrintCount = 1 Then curTotal = curTotal + Nz(Me.Amount, 0) End Sub Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) curTotal = 0 'Reset the sum to zero each new Page. End Sub "Pedro Costa" wrote: I have a report with about 50 pages, and what i'm trying to do is the sum in every page of the report. Detail Section Field 1 Field 2 Field 3 Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4]) Page Section Sum of all SubTotals ??? No matter what i do or i get the #error message or the text box gets invisible What am i doing wrong? Thanks PC |
#15
|
|||
|
|||
Page Footer Sum
Again: Boy, to I feel stupid!! This conversation occurred in 2006!!
Is anyone out there who can help with this in 2009? I am using Access 2007. Thank you!! "Jeannie" wrote: Mr. Browne, I replied to the wrong part of this conversation before. I have done everything you told him to do . I do not get any errors now, but nothing is subtotaled. Am I supposed to put something in the unbound text box? Was "PageTotal" supposed to go in the text box, or the label? What is supposed to go in the text box, or am I just supposed to leave it as "unbound"? Thank you, Jeannie "Allen Browne" wrote: Use Nz() to specify zero for null: If PrintCount = 1 Then curTotal = curTotal + Nz(Me.Amount,0) -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Pedro Costa" wrote in message ... Now it gives me a "RunTime Error 94 - Invalid use of null" in the code line "If PrintCount = 1 Then curTotal = curTotal + Me.Amount" "Allen Browne" wrote: Set the On Format property of the Page Header section to: [Event Procedure] Click the Build button (...) beside this. Access opens the code window. Put the line of code in there, in between the lines "Private Sub ..." and "End Sub". Similarly, the other lines of code have to go into the code window. "Pedro Costa" wrote in message ... Thanks for your reply, but i get the message : "Microsoft Access cant find the macro 'curTotal=0'." "Allen Browne" wrote: See: Reports: Page Totals at: http://allenbrowne.com/ser-11.html The article explains how to collect the total programmatically in the report's events, and place it into the page footer. "Pedro Costa" wrote in message ... I have a report with about 50 pages, and what i'm trying to do is the sum in every page of the report. Detail Section Field 1 Field 2 Field 3 Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4]) Page Section Sum of all SubTotals ??? No matter what i do or i get the #error message or the text box gets invisible |
#16
|
|||
|
|||
Page Footer Sum
Jeannie, I don't use Access 2007 enough to be of help to you.
However, few of the people who answer questions here use the online interface, and, as a result, we couldn't, even if we wanted, go back to 2006 to read the thread. You will be far, far better off to create a new question, giving the details of what you have, what you want, and what you expect, and take it from the start again -- even if that seems extra work. Even if I were the world's greatest Access 2007 expert (which I am certainly not), I could not be of help because there's not nearly enough information in this thread. Larry Linson Microsoft Office Access MVP "Jeannie" wrote in message ... Boy, to I feel stupid!! This conversation occurred in 2006!! Is anyone out there who can help with this in 2009? I am using Access 2007. Thank you!! "Jeannie" wrote: I have the same scenario as Mr. Costa. I have tried all the steps that you gave him. I did not get the exact error messages, but entered all the information anyway. I get the following error message: If Me is a new macro or macro group, make sure you have saved it and that you have typed its name correctly. What does this mean? I do not know anything about macros, and really did not understand the code that I typed in, but tried it anyway. Is there no other way to get a page total? This seems like a lot of code for what should be a standard task. In case I typed it wrong, this is how my event procedure looks: Option Compare Database Private Sub GroupFooter14_Format(Cancel As Integer, FormatCount As Integer) Option Explicit 'Optional, but recommended for every module. Dim curTotal As Currency 'Variable to sum [Amount] over a Page. End Sub Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) If PrintCount = 1 Then curTotal = curTotal + Nz(Me.Amount, 0) End Sub Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) curTotal = 0 'Reset the sum to zero each new Page. End Sub "Pedro Costa" wrote: I have a report with about 50 pages, and what i'm trying to do is the sum in every page of the report. Detail Section Field 1 Field 2 Field 3 Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4]) Page Section Sum of all SubTotals ??? No matter what i do or i get the #error message or the text box gets invisible What am i doing wrong? Thanks PC |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to position a paragraph at the bottom of the last page | Steve Cherne | Page Layout | 9 | December 14th, 2005 01:49 PM |
Problem with Page Numbering | Aurora | General Discussion | 0 | November 21st, 2005 02:10 PM |
How did the first page footer end up on the third page as well? | Caroline | General Discussion | 2 | August 19th, 2005 02:15 AM |
Page Numbers Print { PAGE } in Footer in WORD even after ALT + F9 | Brent | General Discussion | 3 | June 2nd, 2005 05:35 PM |
Problem with first page footer | Nick Cumberbatch | Formatting Long Documents | 2 | July 30th, 2004 01:26 AM |