Asked By
malakasilon
0 points
N/A
Posted on - 08/19/2011
I have created a Microsoft Access database using Microsoft Access 2007. I created a user table with username and password. Now I want to enter using that username and password.
Â
How can I make a login table using Microsoft Access 2007? I want these to happen: if the username and password match, it goes to the next step, but if they don't it returns to the login page with an error message.
Enter Microsoft Access database with login screen
Here is the way of making login page when username and password match, the next screen will appear.
Creating a login & password protection.
-
Step 1:Â Open your Microsoft Access and choose the forum.
-
Step 2:Â After the choosing the forum make shape for your login forum.
-
Step 3:Â Make two rows for username and password where the user enter his username or password.
-
Step 4:Â Choose buttons from your left hand for login or cancel.
-
Step 5: Click on buttons and set up this setting to write names on it.
-
Step 6: Choose forum source code panel to enter the code.
Here is the code of login page:
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
-
Step 7:Â Click on debug and run.
Note : "user1" is your username or password.
Thanks.