Hi Dave -
Thanks for the response. I've tried the Requery approach; it doesn't apply
in this case. I have found a work-around using the AfterDelConfirm event,
but it's not ideal.
'TextBoxSub' is located on the Subform Footer (which is invisible) and it is
a calculated control that sums Cost values for records on the subform.
'TextBoxParent' is an unbound textbox control on the parent form that is
reset programmatically in a variety of event procedures to equal the value in
TextBoxSub. I need to reset it in one more event - when an entire record is
deleted from the subform.
The problem I have found is that a record delete does fire the Form_Delete
event, but the calculated TextBoxSub control doesn't update until after the
Form_Delete event completes... In other words TextBoxSub still holds the
pre-deletion total; using the Form_Delete event procedure to assign that
value to TextBoxParent simply assigns the pre-delete value to TextBoxParent.
The only event that I can get to work is AfterDelConfirm. This event
apparently fires after the record is physically deleted. However, users may
have Confirm Record Changes turned off, in which case, the AfterDelConfirm
event doesn't occur.
Don't knock yourself out on this one; I guess I'll go with the work-around
for now. However, it sure is curious that the Delete event must complete
BEFORE calculated controls are updated. I've tried all kinds of backdoor
approaches (AfterUpdate, Requery, Recalc, Refresh, waiting for Delete event
to trigger the Current event, etc.) and cannot find a solution to what seemto
be a very common problem.