Calculations on a Subform

G

Guest

I have a Form/Subform. The FORM consists of two field "Confirmation ID"(Key),
and "Confirmaiton Number". The subform consists of "Purchase ID"(Key),
"Confirmation ID", "Item Description", "PricePaid", and "QTR". The QTR field
is a combo box which indicates when something was purchased, 1st, 2nd, 3rd,
4th qtr. This subform is a Continuous Forms. I have one unbound field
labeld "TotalPricePaid" in the footer which Totals the "Pricepaid";
=Sum([PricePaid]). Works great. My problem is I have four unbound fields,
1stqtr, 2ndqtr, etc. for each qtr, and I need each of them to total according
to there QTR in that record set. I've tried Dsum which brings prolems of it
own.

The other problem is when I Select the next Record, "Confirmation number",
the Sum of the "TotalPricePaid" changes to the next record set, but I can't
get the totals for QTR to change to the next record set. Sorry if this is
confusing.


Dan H
 
M

Marshall Barton

Dan H. said:
I have a Form/Subform. The FORM consists of two field "Confirmation ID"(Key),
and "Confirmaiton Number". The subform consists of "Purchase ID"(Key),
"Confirmation ID", "Item Description", "PricePaid", and "QTR". The QTR field
is a combo box which indicates when something was purchased, 1st, 2nd, 3rd,
4th qtr. This subform is a Continuous Forms. I have one unbound field
labeld "TotalPricePaid" in the footer which Totals the "Pricepaid";
=Sum([PricePaid]). Works great. My problem is I have four unbound fields,
1stqtr, 2ndqtr, etc. for each qtr, and I need each of them to total according
to there QTR in that record set. I've tried Dsum which brings prolems of it
own.


You can use "conditional" Sums in subform footer text
boxes:

=Sum(IIf(QTR = 1, PricePaid, 0))
 

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