When is a delete completed in an APD bound form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I wonder which event to use in order to requery the content of a subform
after the user has deleted a record in another bound listform. I understand
that the order of events is BeforeDeleteConfirm, AfterDeleteConfirm, Delete.
So I put the code in the Delete event but it doesn't work. Probably the
record is not yet deleted because the Delete event has a Cancel parameter.
Using Access 2003 with SQL Server 2000.
TIA,
Norbert
 
Hi Norbert,
you are right!
This is the events sequence in ADP.
----
BeforeDelConfirm
AfterDelConfirm
Delete
Current
----

you can requery the subform in Current event.
----
Option Compare Database
Option Explicit

'Flag
Dim Deleted As Boolean

Private Sub Form_Delete(Cancel As Integer)

Deleted = True

End Sub

Private Sub Form_Current()

If Deleted = True Then
Forms("OtherForm").Child1.Form.Requery
Deleted = False
End If

End Sub
 
Back
Top