Using the Sum() with parent/child form

herbertioz

Registered User.
Local time
Today, 07:45
Joined
Nov 6, 2009
Messages
66
I have to fields in my subform:
Quantity, Price and SubTotal

In my SubTotal field i have the code: =[Quantity] * [Price]

My goal is to Sum the SubTotal field for all records in a field in the main form.

How can I do it? I have tried all kind of code with the expression builder.

Please help:)
 
=Sum ([Quantity] * [Price])
 
It doesn't work. Error
 
If you put a textbox in your subforms footer and call it Total, with the controlsource = Sum([Quantity] * [Price])

Then on your mainform put a textbox with its controlsource:

=NameOfSubform.Form!Total

Replace whats marked in red with your subformname.

JR
 

Users who are viewing this thread

Back
Top Bottom