Total/Subtotal Calculation from Subform (1 Viewer)

jjeong1210

New member
Local time
Today, 13:10
Joined
May 18, 2018
Messages
2
I have data that is labeled as below:

Year Service Price
2018 Wash 10
2018 Pick Up 20
2019 Wash 15
2019 Pic Up 23

I want a subtotal/total that will add the total price for year 2018.
I have tried
=iif([subform].[form]![year]="2018",sum([subform].[form]![price]),)

But it would return #error as result. Is there something wrong with my formula?
Any help are appreciated!
 

jjeong1210

New member
Local time
Today, 13:10
Joined
May 18, 2018
Messages
2
=DSum([Subform].[Form]![Price],[Subform].[Form]![Year],[Subform].[Form]![Year]="2018")

I did the above, and it's returning the calculation as #Error still..
Any advice? Thank you
 

plog

Banishment Pending
Local time
Today, 15:10
Joined
May 11, 2011
Messages
11,611
DSUMS must look into a table/query, not a form. Read the documentation

DSUM("[FieldNameHere]", "TableQueryNameHere", "Criteria=Here")
 

Users who are viewing this thread

Top Bottom