Calculated control based off other calculated controls

tmyers

Well-known member
Local time
Yesterday, 22:16
Joined
Sep 8, 2020
Messages
1,091
I am trying to make a running summary form/subform that will just have controls displaying running totals/average/percentages etc. The first one is giving me some problems however in that all I can get it to display is #Error.

For the control source, within the expression builder I am going down the chain of references to the exact forms and controls I am trying to summarize. Here is what the expression builder cobbles together;
=Sum([ProjectTotalsQrySub].[Form]![ExtensionTxtBx])
That however throws the #Error. The referenced text box has the calculation =[SumOfQty]*[Unit Price]. To go even further, [Unit Price] is a calculation being done within the source query of the sub-form.

Can I not do this the "simple" way via expressions in controls?
 
I would like to add that I am just doing it via a query now, but I am curious as to why doing it via controls does not work.
 
Can I not do this the "simple" way via expressions in controls?
You should be able to, but

For the control source, within the expression builder I am going down the chain of references to the exact forms and controls I am trying to summarize.
If the values you're trying to sum are in another Form, I am not sure you can do that.
 
If I understand what you want to do. In the subform footer add something like (can be hidden)
=sum([SumOfQty]*[Unit Price])
On the main form you should be able to directly reference that hidden field
=[projectTotalsQrySub].[Form]![txtBoxTotalSum]
 

Users who are viewing this thread

Back
Top Bottom