Summing the values in a column

S

silarri

Hi everybody,

is there some easy way to add all the values of a column of a table (to
get the total) returned by a query and show it on the same page (to
print it)? I am interested in doing something similar to the reports
you can do with other tools such as Microsoft Works.
Thanks in advance,

Sergio
 
M

Mike Labosh

is there some easy way to add all the values of a column of a table (to
get the total) returned by a query and show it on the same page (to
print it)? I am interested in doing something similar to the reports
you can do with other tools such as Microsoft Works.

In SQL, there is a SUM() function.
VBA has a DSum() function.

But what I think you're really looking for is to use the grouping feature on
a Report. You can make a grouping in your report that groups by whatever
you need summed, or if you just want a sum of the whole result set, you can
put an unbound text box in the footer of your report and let its
controlsource be Sum([your column])

Peace & happy computing,

Mike Labosh, MCSD
"I have no choice but to believe in free will."
 
Top