473,387 Members | 1,318 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.

Summing in Page Footer w/ balanced brought forward from prev page

Access 2003 Report rptWhiteMailDeposit

I have found the "four lines of code" solution to adding sums to page
footers and it is working...mostly. (if report is only one page long it
doesn't count. Over two pages it works.)

In the rptWhiteMailDeposit I would like to have in the PAGE FOOTER of
each page the following:
Total Brought Forward (from previous page of report when report is
longer than 1 page)
Page Total (txtPageCashSum + txtPageChecksSum)
Grand Total (only displayed on last page of report. Sum of Page totals
to that point)

I've tried several things and inevitably the total brought forward on
page 2,3 etc. gets reset to zero when the pageheader print function
resets txtPageCashSum. A global variable solution perhaps? I can only
find a vague reference to a solution that used to work with Access
2000.

Here is the code I'm using. Any help would be appreciated. I am head of
non profit (The Salvation Army )in Covington, VA

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

txtPageCashSum = txtPageCashSum + txtDonorCashAmmount
txtPageCheckSum = txtPageCheckSum + txtDonorCheckAmmount
End Sub

Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As
Integer)
txtPageCashSum = 0
txtPageCheckSum = 0

End Sub

FYI: May be effcting things:
Code for filter form that alters the content of this report on the fly:
Private Sub cboDateDonationEntered_MouseDown(Button As Integer, Shift
As Integer, X As Single, Y As Single)
ocxCalendar1.Visible = True
ocxCalendar1.SetFocus
If Not IsNull(cboDateDonationEntered) Then
ocxCalendar1.Value = cboDateDonationEntered.Value
Else
ocxCalendar1.Value = Date
End If

End Sub

Private Sub cmdApplyFilter_Click()

Dim strDonationDate As String
Dim strCampaign As String
Dim strFilter As String

If SysCmd(acSysCmdGetObjectState, acReport, "rptWhiteMailDeposit") <>
acObjStateOpen Then
DoCmd.OpenReport "rptWhiteMailDeposit", acViewPreview
End If

txtPageCashSum = 0
txtPageCheckSum = 0

If IsNull(Me.cboDateDonationEntered.Value) Then
strDonationDate = "Like '*'"
Else
strDonationDate = "=#" & Me.cboDateDonationEntered.Value & "#"
End If

If IsNull(Me.cboCampaign.Value) Then
strCampaign = "Like '*'"
Else
strCampaign = "='" & Me.cboCampaign.Value & "'"
End If

strFilter = "[SystemInputDate] " & strDonationDate & " AND
[DonorCampaign] " & strCampaign

With Reports![rptWhiteMailDeposit]
.Filter = strFilter
.FilterOn = True
.txtReportTitle.Value = "Name of Appeal: " &
Me.cboCampaign.Value
.txtReportRunDate.Value = "Date: " &
Me.cboDateDonationEntered.Value
End With
End Sub

Private Sub cmdCancel_Click()
DoCmd.Close acForm, "deposit report"
End Sub

Private Sub cmdRemoveFilter_Click()
On Error Resume Next
Reports![rptWhiteMailDeposit].FilterOn = False
End Sub

Private Sub ocxCalendar1_Click()
cboDateDonationEntered.Value = ocxCalendar1.Value
cboDateDonationEntered.SetFocus
ocxCalendar1.Visible = False
End Sub

Aug 5 '06 #1
0 1563

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

Similar topics

7
by: Hank | last post by:
I have a report-summing problem using Access 2000. When a section runs over the end of the page, sometimes a detail gets picked up twice. Example: Customer Header XYZ Company Detail Section...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
2
by: ABC | last post by:
How to I know the previous page is clicked to forward the current page? As our web site have many methods to enter the web page, I need to know the users clicked which link or which part of...
1
by: CaptainDahlin | last post by:
I know the basics about access reports and putting page totals in the page footers. What I can't figure out is along with the current page total to display the previous page total: At the bottom...
2
by: CaptainDahlin | last post by:
I know the basics about access reports and putting page totals in the page footers. What I can't figure out is along with the current page total to display the previous page total: At the bottom...
0
by: peridian | last post by:
Hi, I wanted a web page where I could post code to, and have it appear in coloured formatting based on the context of the code. Most of the techniques I have seen for this involve complex use...
1
by: turtle | last post by:
I understand that access can not sum a calculated field but am having trouble figuring out the work around. I have a report that averages the cost of each part number. Each part number will have...
4
osward
by: osward | last post by:
I had made a table colum sortable and paging the table, following are the code // Display Event List echo "<center>"._EVENTLIST."</center><br>"; $now = Date(Y-m-d); // sort table...
3
by: OllyJ | last post by:
Hi guys hope you can help I have a text box for each day of the week in a form and numbers are entered into them (but sometimes they need to be left blank i.e. not 0). I am summing these values...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.