The deletion MsgBox works fine, but I don't want it to popup when deleting a field just the record. How can I adjust this codeor event to have it to popup only during deleting a record.
CODE
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDelete Then
MsgBox "You don't have permission to delete records!", vbExclamation, "Deletion Denied"
Else
End If
End Sub
Also, how do I incorporate this statement "If prompt consists of more than one line, you can separate the lines using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or carriage return linefeed character combination (Chr(13) & Chr(10)) between each line." into my msgbox prompt?
I tried this (MsgBox "You don't have permission to delete records!&Chr(13) & Chr(10)&Trying something new", vbExclamation, "Deletion Denied") and it didn't work.