By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,969 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,969 IT Pros & Developers. It's quick & easy.

Sum the value on a continuous form

P: 166
Good Morning,

I am trying to get the sum of values on a subform, that is a
continuous form.

The name of the main form is : F_MixDesign
Subform is : SF_MixSample
Subform control name is: DM_Yield

the text box that I am storing the value in is an unbound text box.
the record source is:
=Sum(Forms![F_MixDesign]![SF_MixSample].Form![DM_yield]), which is
giving me a #Error. Should I be using sum or Dsum? I have tried both
and neither have worked. the DM_Yield is also an unbound calculated
field, whose record source is a function I created. The functions
works fine and returns to me the correct calculations, but now I need
a total sum of that row. How can I restructure my calculation to
return to me the correct information?
Dec 3 '08 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 1,287
I believe you can only Sum([FieldName]), you can't Sum(ControlName). But if you set the subform's recordsource to a query with a calculated field, you can sum that field. DSum is when you need to specify criteria, like where condition.
Dec 3 '08 #2

P: 166
Hi ChipR,

Thank you for your response.

I have tried Sum([FieldName]) in the subform footer, and that gave me an error as well. As I stated, this calculation is done on the form, via a function, which is why I can't use a query to calculate the field. Any ideas?
Dec 3 '08 #3

Expert 100+
P: 1,287
Calculated fields in a query can be defined by a function and based on another field. Like
Total: MyFunction([field1],[field2])

I'm working on this myself for totals of calculated columns on a subform, but I just don't want to put all that mess in the query, so I'm leaving it off for now. I'll let you know if I get anything easier to work, though.
Dec 3 '08 #4

P: 166
Hi ChipR,

I took your advice about being able to call a function in a query, and you were right! it worked perfectly (after I modified my argument names to match those in the query). It works!

Thank you
Dec 3 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.