Text box control source is sum of other text boxes...

  • Thread starter Thread starter JimS
  • Start date Start date
J

JimS

tb1: =dsum(.....)
tb2: =dsum(.....)

etc.

tbTot: =nz(tb1,0)+nz(tb2,0)+nz(tb3,0)....

tbTot calculates too fast. It only catches the value of tb1. Needs to
calculate last in the series, after all the rest are done. Ideas? Probably
simple. Thanks in advance.
 
Hi JimS,
you can try using vba to get the total-->
Me.tbTot = nz(tb1,0)+nz(tb2,0)+nz(tb3,0)....

Pick a suitable event to place this code, preferably the event which causes
the values for tb1, tb2 ... to change.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
The event that causes those other text boxes to change is the intrinsic
recalc associated with (I assume) the OnCurrent event. Can't imagine it would
do any good to code it into the actual OnCurrent event handler (I don't have
one now....) I would assume it would be just as quick to calc, and therefore
miss the postback from the dsum calcs.

I guess I'm just going to have to make the control source equal to

=DSum(...)+DSum(...), etc.

That means I recalc all those DSums twice every time one of them is calc'd.

I don't like that.
 
Back
Top