I have a data entry form with records that have some fields already populated. I was wondering if there was any way that I could check to see if any original data is in the record and deny deletion of that record. I want them to be able to delete records that they have added. I've tried the before and after delete confirm functions but they aren't triggering. Is there something I'm doing wrong?
Here's my code for the before delete:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
If Me.ThisYrAmend <> 0 Then
msgbox "Sorry, but you're not allowed to delete", vbOKOnly, "Delete"
Cancel = True
End If
End Sub
Here's my code for the before delete:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
If Me.ThisYrAmend <> 0 Then
msgbox "Sorry, but you're not allowed to delete", vbOKOnly, "Delete"
Cancel = True
End If
End Sub