MS Access, User login table help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

spudy12

Thread Starter
Joined
Nov 7, 2010
Messages
315
In the database i have a password table with a list of username and passwords in.
I have a login form with a username and password entry box that currently run via a code

Private Sub Enter_Click()
Username.SetFocus
If Username = "Admin" And Password = "you777" Then
MsgBox "Access Granted", vbInformation, "Stereo Cinema"
DoCmd.Close
DoCmd.OpenForm "Main Menu"
ElseIf Username = "staff1" And Password = "hello99" Then
MsgBox "Access Granted", vbInformation, " Stereo Cinema "
DoCmd.Close
DoCmd.OpenForm "Main Menu"
ElseIf Username = "staff2" And Password = "cheese" Then
MsgBox "Access Granted", vbInformation, " Stereo Cinema "
DoCmd.Close
DoCmd.OpenForm "Main Menu"
Else
MsgBox "Incorrect Password! Please re-enter your Username and Password."
End If
End Sub
This works fine for now, but i want it to be able to call up the table and search for the corrosponding login information rather than just have it specifically in the code.
This way i can create an update query to change password, add new users easily.

How would i go about getting the logins to come from the password table?

Many thanks

Spud
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top