M
Michelle K.
I have a continuous subform with a calculated control in the footer to total
a field on the subform. I'm trying to use events/code to "copy" that total
to a bound control in the main form. Can't just use a calculated control on
the main form (=subform!total) because the "total" on the main form may be
over-ridden by a value at users discretion.
I've tried using the AfterUpdate event (as well as others) of the subform
control that can change (and therefore change the value of the total), but it
appears that the calculated controls are not being updated until sometime
after the GotFocus event of the next control on the subform. So after my
code for the event has run and the focus is on the next control on the
subform, the calculated total on the subform is correct, but the bound
control on the main form shows the total before the update, not after. I am
saving the current record as the first step in the event code, then using
forms![main form]![bound field]=me.totalfield to update the main form bound
field.
Any help is greatly appreciated!
a field on the subform. I'm trying to use events/code to "copy" that total
to a bound control in the main form. Can't just use a calculated control on
the main form (=subform!total) because the "total" on the main form may be
over-ridden by a value at users discretion.
I've tried using the AfterUpdate event (as well as others) of the subform
control that can change (and therefore change the value of the total), but it
appears that the calculated controls are not being updated until sometime
after the GotFocus event of the next control on the subform. So after my
code for the event has run and the focus is on the next control on the
subform, the calculated total on the subform is correct, but the bound
control on the main form shows the total before the update, not after. I am
saving the current record as the first step in the event code, then using
forms![main form]![bound field]=me.totalfield to update the main form bound
field.
Any help is greatly appreciated!