For a Running Total that appears only in the Report Footer (aircode):
1) At the top of your report module (between "Option Explicit" and the first
Sub/Function):
Private sngRunTotal as Single
2) If I understand your OP, you should already have something like:
Me.txtNoSchools = somevalue
within, or perhaps following, your Select Case statement in the code for the
Detail_Print event.
Insert the following after that line (after every occurance of that line, if
its within the Select Case) :
sngRunTotal = sngRunTotal + somevalue (or sngRunTotal = sngRunTotal +
Me.txtNoSchools)
3) I don't know where you want to display the RunningTotal when done, but
I'll assume it's in a textbox in the ReportFooter.
Within the code for the Print event for the ReportFooter section:
Me.txtNoSchoolsGT = sngRunTotal
HTH,
--
George Nicholson
Remove 'Junk' from return address.
Steve Albert said:
I am relatively new to this level of database design. Can you be more
specific about how I might do that?
- Steve
George Nicholson said:
-Create a modular-level "running total" variable in your report module
(available to all procedures within the module).
-When your Select Case assigns a value to the Detail textbox, increment
the
RT variable by the same amount.
-Assign the RT value to the appropriate textbox(s) in your Footer(s)
OnFormat or OnPrint event.
-If you need both a "group" RT and a GrandTotal RT, create 2 variables to
increment but reset the Group RT to zero after setting your Group Footer
textbox, etc.
HTH,
--
George Nicholson
Remove 'Junk' from return address.
I have an unbound text box, called [NoSchools] in the detail section of
a
report that gets it's data from Select Case statements in the onprint
event .
I want to be able to find the sum of the numbers in this text box, but
can't
because it is an unbound text box in a report. The report is based upon
a
query.
Any help will be appreciated.
- Steve