Yes, on the On Click event of the delete button:
Dim sPass As String
sPass = InputBox("Please enter the password:")
If sPass <> "YourPassword" Then
MsgBox "You cannot delete this item."
Exit Sub
Else
'...carry out delete function
End If
If you don't want to put the password in plain text, you can put it in a hidden table, then launch a hidden form when the app opens, then do this:
Dim sPass1 As String
Dim sPass2 As String
sPass2 = [Forms]![frmHiddenPassword].[txtPassword]
sPass1 = InputBox("Please enter the password:")
If sPass1 <> sPass2 Then
MsgBox "You cannot delete this item."
Exit Sub
Else
'...carry out delete function
End If
HTH
mmcdonal
|