> I have a subform in datasheet view. When the user deletes
> a row from the subform I want some code to execute. I
> have not been able to figure out what event to use. I
> have put debug messages in several form events and none of
> them are being triggered by the delete
> (Form_AfterDelConfirm, Form_AfterUpdate,
> Form_DataChange). I have also tried an event for the
> field that is being deleted (txtPrjctStBgnDt_AferUpdate).
The AfterDelConfirm event should be triggered - I use it frequently. Here is
an example of the code in such a procedure that runs code after a record has
been deleted:
'******************EXAMPLE START
Private Sub Form_AfterDelConfirm(Status As Integer)
Select Case Status
Case acDeleteOK
'The code runs here if record was deleted
MsgBox "The record was deleted."
End Select
End Sub
'******************EXAMPLE END
--
Bruce M. Thompson, Microsoft Access MVP
(E-Mail Removed) (See the Access FAQ at
http://www.mvps.org/access)
>>No Email, Please. Keep all communications
within the newsgroups so that all might benefit.<<