G
Grimwadec
I have created a function called DeleteJobRecords to delete subsidiary
records when deleting the main record thus:
Private Sub Form_Delete(Cancel As Integer)
DoCmd.SetWarnings False
If MsgBox("Subsidiary Record Details will also be deleted", _
vbOKCancel) = vbCancel Then
Cancel = True
Else: DeleteJobRecords
End If
DoCmd.SetWarnings True
End Sub
I have coded the DeleteJobRecords function to not display any warning as it
runs each SQL delete query. However I have been unable to stop the built in
access warning re deleting the main record. My attempts included the
DoCmd.SetWarnings statements in the above Sub. Also tried several other
methods including Before and After Delete etc.etc. ad nauseum.
Help please!
records when deleting the main record thus:
Private Sub Form_Delete(Cancel As Integer)
DoCmd.SetWarnings False
If MsgBox("Subsidiary Record Details will also be deleted", _
vbOKCancel) = vbCancel Then
Cancel = True
Else: DeleteJobRecords
End If
DoCmd.SetWarnings True
End Sub
I have coded the DeleteJobRecords function to not display any warning as it
runs each SQL delete query. However I have been unable to stop the built in
access warning re deleting the main record. My attempts included the
DoCmd.SetWarnings statements in the above Sub. Also tried several other
methods including Before and After Delete etc.etc. ad nauseum.
Help please!