2.29 Password Protecting Queries with Access VBA
Forcing a password to be entered in order to run a query
Here’s the code I used
Password.SetFocus
If Password = “Manager1″ Then
MsgBox “Access Granted”, vbInformation, “CD Shop”
MsgBox “Delete Query Active”, vbInformation, “CD Shop”
DoCmd.RunMacro “M_ArchiveStock”
MsgBox “Deletion Confirmed”
Else
MsgBox “Please re-enter your Password.”
End If
Duration : 0:6:54
[youtube dLTw385h7OQ]