Unanswered: On Delete Event ...Before Delete Confirmation
Before I delete a record on from a form, I want to check and see if that ID exists in another table, If so I want to discouninue the delete procedure, here is my code:
(I'm using a SQL server backend)
Set CSet = New ADODB.Recordset
CSet.ActiveConnection = CurrentProject.Connection
If CSet.EOF Then
MsgBox "There are Contacts assigned to this company." _
& Chr(13) & "Delete the company from those contacts first and then delete the Company.", vbCritical, "Delete Responses First"
My problem is that I don't know how to stop the MS Access delete procedure ?