Trouble getting a calculated field to SUM.

Larry G

New member
Local time
Today, 06:58
Joined
Feb 15, 2011
Messages
8
I thought I posed this the Forms Forum earlier today...but..can't seem to find it. I hope this is the right forum for my issue/problem if not I apologize and hope someone will point me to the right one.

Otherwise, I'm having trouble getting an unbound text box in a subforms footer to return the some of one of the columns in the subforms. The subform is a continous form.

The following fields are included in the subform B.

Subform B - [cube] - its control source is set to a unbound text field on another subform's (lets call it subform A) footer that sums the total cubic feet associated with a particular record.

Subform B - [rate] – is a field in the same query that drives the subform B – [rate] format is currency and the data is populated with a dollar amount that is taken into account to determine/calculate a billing amount per cubic foot

Subform B - [MiniumCharge] is a field in the same query that drives the subform-B. The data is populated with a dollar value that is the minium charge for the item/service.

Subform B - [BillingAmount] field's control source is “ =IIf([CUBE]*[RATE]<[MinimumCharge],[MinimumCharge],[Cube]*[Rate])”

I have an Unbound Text Box: in the same Subform B's footer: control source is set to an expression:

=Sum(Nz([BillingAmount],0))

The above returns $0.00

I have tried other combinations of the sum expression. =Sum([BillingAmount]) and it returns a blank field

I really need the SUM of the [BillingAmount] because its result has to be used/display in other parts of the dbase.

I hope someone can help me to get the [BillingAmount] field to total/sum.

Thanks in advance for any suggestions or comments.

Larry G.
 
You can't sum a calculated control. You would have to sum the IIf function.
 

Users who are viewing this thread

Back
Top Bottom