Subtotals in access report using vba
I made a module by witch I automaticly generate a report.
This report has 2 grouplevels (you can choose the field of the grouplevel in a form)
For instance :
grouplevel 1 contains the field "person"
grouplevel 2 contains the field "product the person harvest"
In the section Detail is the field Weight and weight.
There are different dates with different weights.
I would like to calculate the sum of the weights for 1 product and 1 person
and I would also like to know the sum of the different weights of all persons
I know in access you can calculate these subtotals easily in the design mode of a repport, but I would like to do this in vba because the report has to be dynamic.
In the attachment you can find the code for making the report (it's in dutch)
|