[AccessD] Total in Footer of Report

Andy Lacey andy at minstersystems.co.uk
Tue Mar 18 13:52:00 CST 2003


Paul
If the total control is bound to a Control source (eg =Sum(something))
then you can't set it to zero, because by definition it will give you
whatever's in its controlsource. There are two ways to achieve this. The
first is to have an unbound control and use code to do your
accumulating, setting and clearing. the second is to use inbuilt Access
functionality to sum a field. In this case where you put it is crucial.
If you create a GroupFooter on location using the Sorting and Grouping
dialog and put =Sum(xxx) in there then Access will automatically print
it and clear it on change of that group.

Andy Lacey
http://www.minstersystems.co.uk



> -----Original Message-----
> From: accessd-admin at databaseadvisors.com 
> [mailto:accessd-admin at databaseadvisors.com] On Behalf Of Paul Liadis
> Sent: 18 March 2003 19:19
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Total in Footer of Report
> 
> 
> Hi all,
> I have an Access report in which I want to display a total in a 
> footer.  The total is fine on the first page, for the first 
> location.  Once 
> the report hits the second location, however, the total does not get 
> initialized and adds to the previous location's total.  I 
> would like to 
> initialize the textbox that displays the total after every 
> location.  However, Access won't let me change the textbox's 
> text property 
> to be equal to zero.  I am using the following code:
> 
> me.txtFoo.setfocus
> me.txtFoo.text = 0.
> 
> Please give me some advice on how to accomplish what I am trying to 
> accomplish.  Am I EVER able to set the text property of a 
> textbox in a Report?
> 
> Thanks in advance,
> 
> ===============================================
> Paul Liadis
> Senior Applications Programmer/Analyst
> University Budget Office
> Pennsylvania State University
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> 




More information about the AccessD mailing list