Total all recordsets from subform

stormin_norm

Registered User.
Local time
Today, 06:28
Joined
Apr 23, 2003
Messages
213
I need some help calculating a Total from all subforms

In the main form if I set the record source =[fsubCourse].Form!ENGsubtotal), I naturally pick up the subform value of ENGsubtotal.
And if there are three recordsets, I can easily move forward & backward or enter values in the subform, and the ENGsubtotal value is sum'd. But how do you show the total of all three recordsets on the main form.
ie. Sum([fsubCourse].Form!ENGsubtotal)
this does not work.

Is the only way to do this with VB code doing something like:
for each form in subform
total = total + [ENGsubtotal]
next

yes/no?? What is the code for looping through these?? Do you use recordset, form or object??

-thanks.
 

Users who are viewing this thread

Back
Top Bottom