Subform not updating after deletion
Posted on 2004-10-20
I have a form which is used as a subform on a main form.
The subform consists of payments, which are entered by a user. There is a running total of the payment amounts, stored in a control called Text10 in the footer of the subform. As payments are entered, the total is recomputed and then Text10.Value is picked up and displayed on the main form in a control called TotalPaid. The subform also has an event procedure which must run AFTER the Text10.Value is reflected in the TotalPaid control. All of this works fine as payments are being ENTERED.
However, if a user DELETES a payment from the subform, I still need the event procedure to run AFTER the new Text10.Value is reflected in the TotalPaid control. And my problem is that Text10 is NOT recomputing automatically when I delete a payment record from the subform. I have tried setting up an AfterDelConfirm event with a Me.Requery and then resto fhte event code.... but the Me.Requery doesn't seem to force Text10 to update itself and get it's value pushed out to TotalPaid. So I dont know what to do... Text10 MUST be accurate before the rest of the event procedure runs.