Requery on Delete

Dwight

Registered User.
Local time
Today, 13:58
Joined
Mar 17, 2003
Messages
168
I have a form that allows my users to enter transactions. The transactions are entered on a subform in datasheet view. At the top of the main form is a continuous form that shows a cash balance figure.

On the After Update Event of the subform I requery the continuous form to reflect changes. This works when new records are added or existing records are modified but the cash balance does not update when a record is deleted.

How do I make that happen?
 
This issue is still unresolved. Any help is appreciated.

The only method I can get to work is a command button that the user must click but this is confusing since the form updates in all instances other than a delete.
 
There is an OnDelete event.
 
Yes, I know it well. But it has been a mirage in the desert for me.

Here is my AfterUpdate Code on the Subform:

Private Sub Form_AfterUpdate()
Forms![frmEnterTransaction]![frmClientCash].Form.Requery
End Sub

It works great when a record is modified but does nothing when a delete occurs.

If I put this on the Subform's OnDelete Event as follows:

Private Sub Form_Delete(Cancel As Integer)
Forms![frmEnterTransaction]![frmClientCash].Form.Requery
End Sub

I get Run Time Error 3246
‘Operation not supported in transactions’

I’ve tried the requery on several places included the main form's AfterUpdate event but so far no luck.

Any ideas?
 
Did anyone ever solve ths problem as I have exactly the same problem? The query that runs off my subform requeries for everything except delete.
 
Yes, I placed code on the subform's On Delete event to requery the unbound form on the main form that has the account's cash balance. But I get the error that I mentioned in my previous post.
 
Thank you for the suggestion. I tried Recalc instead of Requery but it did not update the form.
 

Users who are viewing this thread

Back
Top Bottom