How To: Password protect databases with Microsoft Access

Password protect databases with 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 about creating a login form and password protecting your database.

Here's the code:

Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Access Granted", vbInformation, "CD Shop"
MsgBox "Welcome", vbInformation, "CD Shop"
DoCmd.Close
DoCmd.OpenForm "F_Switchboard"
Else
MsgBox "Please re-enter your Username and Password."
End If

For more information, including detailed instructions on how to implement the above code, watch this MS Access how-to.

It’s Black Friday week on WonderHowTo! Don’t miss out on all of the big sales in the Gadget Hacks and Null Byte shops. And if you’ve been wanting to take some classes without going into debt, check out our best deals on online courses for a variety of skill sets. Don’t miss out on these huge discounts:

See Gadget Hacks’s top 10 BF sales on online courses (up to 99% off) >

See Null Byte’s top 13 BF sales on online courses (up to 99% off) >

Our Best Phone Hacks

Gadget Hacks' tips — delivered daily.

Be the First to Comment

Share Your Thoughts

  • Hot
  • Latest