Question sum on subform datasheet

fenstantra

New member
Local time
Tomorrow, 04:03
Joined
Aug 6, 2012
Messages
6
hi, i want to ask
1 already make textbox name: TbBanyak on subform footer with control source =sum([Jumlah])
i success display it on mainform with texbox control source =[Jualsubform].[Form]![TbBanyak]

how to enter/record the result to table record??
thank you
 

Attachments

Last edited:
Sketchin is correct. You should never store calculated values when any of the component items can be changed. As soon as one value is changed, your calculation is invalid. It is best to recalculate the value as you need it. Reports work the same way as forms so the same techniques will work. To get the sum in a query, the best option is to create a second query that sums to the roll-up level you want and then join to it. The downside of this is the resulting query will not be updateable.

To save a calculation in a bound field, just copy the value into a field bound to the form's RecordSource. It doesn't have to be a visible control. Put the code in the form's BeforeUpdate event.

Me.SomeBoundField = Me.TheControlWithTheCalc
 
thank you all for your reply
on post no 1 i attach my file, maybe u guys can fix it, what i try to do is sum result to be enter/ record to table
thank you

Me.SomeBoundField = Me.TheControlWithTheCalc

try to do that still not working
 

Users who are viewing this thread

Back
Top Bottom