From: robeito on
Hello everybody!!

I have myForm with sfrm1 and sfrm2 embedded (both are in datasheet view)
sfrm1 let me edit, insert and delete records in tbl_1
sfrm2 is read only and shows totals of tbl_1 grouped by different concepts

I want to show the totals updated in sfrm2, I have problems deleting rows in
sfrm1 because the following code in sfrm1 does nothing:
Private Sub Form_Delete(Cancel As Integer)
Forms("myForm").sfrm2.Requery
End Sub

and the following raises "This operation is not supported within transactions"
Private Sub Form_Delete(Cancel As Integer)
Forms("myForm").sfrm2.form.Requery
End Sub

any ideas?
From: Jeanette Cunningham on
Try it like this:
Put an unbound checkbox called chkDelete on sfrm1.

Private Sub Form_Delete(Cancel As Integer)
Me.chkDelete = True
End Sub

In the after update event for sfrm1 put code like this:
If Me.chkDelete = True Then
Me.Parent.sfrm2.Requery
End If

On the current event for sfrm1, put this code:
Me.chkDelete = False


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"robeito" <robeito(a)discussions.microsoft.com> wrote in message
news:022F8264-CE3D-4E3E-861F-CB26917F256B(a)microsoft.com...
> Hello everybody!!
>
> I have myForm with sfrm1 and sfrm2 embedded (both are in datasheet view)
> sfrm1 let me edit, insert and delete records in tbl_1
> sfrm2 is read only and shows totals of tbl_1 grouped by different concepts
>
> I want to show the totals updated in sfrm2, I have problems deleting rows
> in
> sfrm1 because the following code in sfrm1 does nothing:
> Private Sub Form_Delete(Cancel As Integer)
> Forms("myForm").sfrm2.Requery
> End Sub
>
> and the following raises "This operation is not supported within
> transactions"
> Private Sub Form_Delete(Cancel As Integer)
> Forms("myForm").sfrm2.form.Requery
> End Sub
>
> any ideas?