Totaling an average.

S

Shipp

I have a report that is broken down by customer. In the
customer footer I have an average of the sales volume. I
would like a total of these averages in the report footer.
Any help would be greatly appreciated.
 
D

D. A. Gray

You need two event procedures and a module level variable
to hold the total.

In the property sheet for the group footer, select the On
Print event, then pick the Code Builder. This will create
an empty event procedure, which needs just one line:

lngSumOfAverate = lngSumOfAverate + me.txtAverage.Value

In the above snippet, txtAverage is the Name of the
control in the group footer that contains the average.

In the Declarations section for the module, add the
following statement.

Dim lngSumOfAverate as Long

Next, create a Report Footer procedure in the same manner.
It needs just a single line.

Me.TotalOfAverages = lngSumOfAverate

That should do it.

Kind regards,
David Gray
P6 Consulting
http://www.p6c.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top