bill201
asked on
how to prevent user to delete a specific record on a continuous form in microsoft access 2013
i use this code to try prevent user from delete a record that is locked but it's doesn't prevent to delete, what is wrong with this code?
this is my code:
this is my code:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
If Me.Locked = True Then
MsgBox "not able to delete a closed record"
Cancel = True
End If
End Sub
ASKER
thanks
but it's not solved the problem
but it's not solved the problem
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks alot
Change to:
Private Sub Form_BeforeDelConfirm(Canc
If Me.Locked Then
MsgBox "not able to delete a closed record"
Cancel = True
End If
End Sub