Enter Microsoft Access database with login screen

Asked By 0 points N/A Posted on -

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.

Answered By 0 points N/A #116139

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:

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

  • Step 7: Click on debug and run.

Note : "user1" is your username or password.


Login/Register to Answer

Related Questions