[AccessD] Unusual Sub Totals Needed on Access 2007 Report

Doug Steele dbdoug at gmail.com
Tue Mar 20 22:22:27 CDT 2012


I'm not sure where you want this subtotal, or how the Groups are defined.
 If it is at the end of the report and the Groups are numbers ,then the
following formula for the total field should work:

=Sum(IIf([group]=1 Or [group]=2,[Amount],0))

basically it adds the amount value to the total if the group is 1 or 2,
otherwise it adds zero

Doug

On Tue, Mar 20, 2012 at 8:03 PM, Brad Marks <BradM at blackforestltd.com>wrote:

> All,
>
> I am working on a report that has a need for rather unusual sub-totaling.
>
> I will use a simple test example to explain what I am trying to do.
>
> The data for the report comes from a query with only two fields “Group”
> and “Amount”.
>
> There are three groups, Group-1, Group-2, Group-3.
>
> The report needs to have sub-totals for each Group.  This is easy.
>
> Now the tricky part.  The report also needs a total for Group-2 and
> Group-3 added together.
>
> Is there an easy way to do this?
>
> Is there some way to capture select sub-totals for later use?  If I can
> capture the amounts, I can build the extra sub-total into one of the
> footers.
>
> Thanks,
> Brad
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>


More information about the AccessD mailing list