Posts Tagged ‘Script’

2.29 Password Protecting Queries with Access VBA

Monday, February 1st, 2010

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

(more…)