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 multi-user login form to password protect different areas of your database.
Here's the code:
If Username = "staff1" And Password = "staff1" Then
MsgBox "Access Granted", vbInformation, "CD Shop"
MsgBox "Welcome", vbInformation, "CD Shop"
ElseIf Username = "staff2" and Password = "staff2" Then
MsgBox "Access Granted", vbinformation, "CD Shop"
MsgBox "Welcome", vbinformation, "CD Shop"
ElseIf Username = "manager1" and Password = "manager1" Then
MsgBox "Welcome, Manager", vbinformation, "Manager Area"
MsgBox "Please Exercise Caution When Altering Back End", vbinformation, "Manager Area"
MsgBox "Please re-enter your Username and Password."
For step-by-step instructions on implementing the above code and creating your own multiuser login system in Microsoft access, watch this how-to.
Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.