How To: Password protect queries in Microsoft Access

Password protect queries in Microsoft Access

The Microsoft Office Access 2007 relational database manager enables information workers to quickly track and report information with ease thanks to its interactive design capabilities that do not require deep database knowledge. In this Microsoft Access video tutorial, you'll learn how to force a password to be entered in order to run a query.

Here's the code:
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

For detailed instructions on implementing the above code, watch this video how-to.

Just updated your iPhone? You'll find new emoji, enhanced security, podcast transcripts, Apple Cash virtual numbers, and other useful features. There are even new additions hidden within Safari. Find out what's new and changed on your iPhone with the iOS 17.4 update.

Be the First to Comment

Share Your Thoughts

  • Hot
  • Latest