So I have some textbox on my form,and on the last textbox, I turn off the enable so instead of asking the user for the input, I want to make the value on the textbox calculate automatically when the user input on another textbox, so I set the default value like this :
=IIf(IsNull([jmlh]),0,[jmlh]*[harga]*IIf([diskon]>0,[diskon],1))
But the problem is the expression just work when the form loaded, it's still not when value in "[jmlh]" change. Is there any method or something to make it possible?
Don't put your expression into
Default Value, but intoControl Sourceproperty.Then it will always update itself when one of the used fields changes.
If it is a bound field (but why would you want a calculated field stored in the table?), you need to put that formula into a VBA function
and call that function from the
AfterUpdateevents of all involved fields.