Solved Sum / Dsum

Harry Taylor

Registered User.
Local time
Today, 22:46
Joined
Jul 10, 2012
Messages
90
I have a running total TextBox (Text268) on a form

I have a subform (Expenses Subform) with vehicle history (Tyres, brakes, MOT etc)

I want my Test268 to give me the total expenditure from the subform.

I tried =Sum([Expenses subform]![Total]) but get an #Error

Can you help?
 
Aggregate functions must reference field, not control, and must be on form with the field. So if field is named Total, simply in textbox in subform footer section (it will not show with Datasheet View): =Sum([Total]). Then textbox on main form references subform control: =[Expenses subform]![textboxname]
 
Last edited:
And the error is?
Give your controls meaningful names. :(
 
Gasman, the error is #Error showing in textbox.
 
Yes,

Below is a screenshot where the result should be £50

1716219201392.png
 
Have you read post 2? I have edited it so might review again.
 
Sorted, thank you all.


I put the sum in the subform and all ok.

Thank you all
 

Users who are viewing this thread

Back
Top Bottom