Topics Search

How to create a User Login Form in Microsoft Access

How to create a User Login Form in Microsoft Access
Views: 836
In my Microsoft Access database I have a table of Users, each with a user name and password, and a login form set up. I want the user name and password entered into the login form to be compared against those stored in the Microsoft Access table. If a match is found the user is allowed to access to the system, if not the system should exit.
Answer » The following details one procedure that could be applied to this scenario. There are many more approaches to this and also other areas that will need to be secured within your database environment. You should also look into Disabling/Enabling the Shift Bypass Key.
Sponsored Links:

Similar posts...


User Login form and session

User Login form and session Icon
Did anyone know and have a example of how to create a user login and session? I want to track who's login and what form or function/menu user can use base on series of permision level that he/she can use in certain access database system. Basically I can create the login form but dont know how to create a login session. The reason is if user click on certain menu that they dont have permision like (administration menu), access will not allow

Login form, to form

Login form, to form Icon
I have a login form setup in a database that basically uses a table to check for username and password. I would like to be able to use that login information to automatically open a form, that also pulls with it the users login name, and then store the login name to each record the user enters.

I am hung up on how to get the login information to transfer over to the form. Here is the code that controls the login process;


All I need is the username. And then I need it to autopopulate a field in a form.

Access 2010- Help with closing a Login form and going to a main menu

Access 2010- Help with closing a Login form and going to a main menu Icon
I have a core database set up that requires the user to log onto the database through a Login form, then once the user successfully logs onto the database, the login form is supposed to close and display the main menu.

For some reason, but now the Login screen does not close properly.

Here is my code for the Login botton of the Login screen.

Access DB Lock Out

Access DB Lock Out Icon
I have not been here for sometime now, but just had a blond moment and locked myself out of my database. I know there must be a way to get back into the DB with some programming code inanother database,

What Happen? - I created a login form, where a user enters the login details. It was working fine and I loaded the login form as the form to open when access starts. Each time I open the DB I can see access 2007 popping up before the login form shows, also the background appears.

I was trying to get rid of the background and the access 2007 start screen. I just wanted the login form to show. I then changed the following controls:

Allow Add. = No
Allow Del. = No
Allow Edits = No
Allow Filters = No
Data Entry = No

I saved the form and THEN.

When I started the DB, it do not do the required results and it would not allow me to enter the user details to login. all this said, I cannot access the db to change.

SOmetime back I result some DAO process where you can access another database and not the current one. I would like to do similar code to reset the password on the useraccess table so whenI start my data base it will access a blank password.

Creating a Multi-User Login

Creating a Multi-User Login Icon
I am trying to create a multi-user login. When I create this in a 'sample' database it works fine. I create three forms and one login form with the appropriate VB code. No problems,

The problem is when I try to create the exact same login, in my actual database, for some reason it does not work. I checked all the names and so on but cannot seem to get it to work.

Access 2007 (Current User)

Access 2007 (Current User) Icon
I used to use Access 2000, now our office has upgraded to Access 2007. I was told that rather than having a separate user list internal to the database to pull Current User based on the login and password entered, I could use the Windows login information instead.

Is there a different built in function that will pull the computer login information rather than the DB access login.

When I use (Current User) now it simply enters Admin in the field since no user login information is in the new database.

Passing User from Login form to Main form

Passing User from Login form to Main form Icon
I am trying to pass the Access Code from the Login from to the Main form in a variable called User. The plan is when the user adds a new record in the Main form the User value is added to a control source in Main table field named strUser.

How to add a user login form?

How to add a user login form? Icon
I am making a data entry form application for some users. I want to add a user login form when opening the MS Access 2007 database. No password needed.

So, after the application is done, it can be used like that: 1. Give the accdb file to the 1st user. The user can use the login form to find his/her records in a main form (that is bound to a main table used to collect data), and then modify existingrecords or add new records at the end of the main form.
2. Give the accdb file to the 2nd user. The user can use the login form to find his/her records, and then modify existing records or add new records.
3. . (next user)

Login form with special condition

Login form with special condition Icon
I'm still newbie with ACCESS n VBA code.
I have a form and a table login(user, password, role)where user can login with username and password by referring to Login table.
How can I view the role in MsgBox according to username and password in table login? I'm having trouble in here (Underline words). The Logic is if username and password has been filled and then search in table. If Its TRUE then it will show MsgBox with the role user in table Login.

Or do you have any better codes for this?

User Login Form Help

User Login Form Help Icon
The database is a simple employee database but I need to restrict access to some employees with certain users.

I.e. Hire Manager can only access hire employees, accounts manager can only access accounts employees etc.

I have all the employees in one table called tblEmployees. Each record has a field called 'location' which shows which department they are in.

I have a table called tblUsers with User Names and passwords. I have also created a simple user login form with the following code beind a login button.


The code works fine as a login prompt but I need help with restricting access to certain records within the employees table.

I also need to block access to any tables/queries etc for users until logged in. Currently users can avoid the login form and access/