You are here:

Using MS Access/Login Page in Access 2010


Good evening...

I have a database where I have two sets of users--administrators and readers.

What I would I like to have happen is on the login form, when an administrator selects their name from a combo box and presses the login button, the administrator screen opens up.  When the non-administrators select their name, the non-administrator form opens up. The combo box is populated and works if I have everybody opening up the same form. I don't think I need passwords--the only reason why I have a login screen is specifically for the purpose I mentioned above--to separate the two groups. If I need to ditch the 'login' button altogether, I'd be okay with that too.

I've created an "Employees" table with their name, id and user access level--this is linked to the login form.  I've also created a "Security" table with the access level definitions (though I don't know if it's necessary since I'm not using passwords).

I've read so many blogs today, my brain is now soft scrambled eggs.  Any guidance you can provide is greatly appreciated.

Thanks so much for your help!

I hate to point you to my blog on Login Security, but it does pretty much describbe how to do this.

I can't be specific without knowing how you setup the login form, but the combobox that theey select their name from should have a rowsource like this:

SELECT EmployeeID, Lastname & ", " & Firstname As Fullname, AccessLevel
FROM Employees
ORDER BY Lastname, Firstname;

Behind the login button you would have code like:

If Me.cboUser.Column(2) = 1 Then
   open admin form
   open reader form
End If

This assumes that the administrator access leve has a code of 1 and Reader, 2.

Frankly, though, why bother if you don't use a password. Without a password anyone can select an admin user and have admin access.

Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers

Answers by Expert:

Ask Experts




I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.


I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Brooklyn College BA

©2017 All rights reserved.