J
Jay
Hi -
I have an unbound calculated textbox control ("TBoxSub") in an invisible
form footer of a subform. There is a visible unbound textbox control
("TBoxParent") on the parent form that is updated programmatically to display
the value in TBoxSub.
Updates to TBoxParent are event-driven and all events are correctly updating
the TBoxParent control except for the Form_Delete event. In other words,
when a user deletes a record on the subform, the Form_Delete event fires and
programmatically updates TBoxParent with the value in TBoxSub, but when the
Form_Delete event fires, TBoxSub is the calculated value of the recordset
BEFORE the deletion. TBoxParent is incorrectly updated with this value, the
deletion proceeds, TBoxSub is recalculated (naturally by Access) to the new
value, and TBoxParent and TBoxSub are no longer equal (which they should
always be).
This is obviously a 'timing of events' problem, but I can't seem to
determine which event to use to update TBoxParent. It would have to be an
event that fires AFTER the TBoxSub is recalculated. Although the Current
event is a likely choice, it conflicts with other VBA code and causes an
infinite loop in this application. Is there another event (or method) that
could be used to trigger the update of TBoxParent?
I have an unbound calculated textbox control ("TBoxSub") in an invisible
form footer of a subform. There is a visible unbound textbox control
("TBoxParent") on the parent form that is updated programmatically to display
the value in TBoxSub.
Updates to TBoxParent are event-driven and all events are correctly updating
the TBoxParent control except for the Form_Delete event. In other words,
when a user deletes a record on the subform, the Form_Delete event fires and
programmatically updates TBoxParent with the value in TBoxSub, but when the
Form_Delete event fires, TBoxSub is the calculated value of the recordset
BEFORE the deletion. TBoxParent is incorrectly updated with this value, the
deletion proceeds, TBoxSub is recalculated (naturally by Access) to the new
value, and TBoxParent and TBoxSub are no longer equal (which they should
always be).
This is obviously a 'timing of events' problem, but I can't seem to
determine which event to use to update TBoxParent. It would have to be an
event that fires AFTER the TBoxSub is recalculated. Although the Current
event is a likely choice, it conflicts with other VBA code and causes an
infinite loop in this application. Is there another event (or method) that
could be used to trigger the update of TBoxParent?