Enable command buttons based on login

foxtet

Registered User.
Local time
Tomorrow, 00:57
Joined
May 21, 2011
Messages
129
I’m developing a small database to track patient’s records. I want particular group of people to access data only they are authorized.
To do this I have created a login form and users can log on to the database through login. In the main window I have a list box and command buttons. So what I need is that to allow users to access command buttons based on their access level defined in user table. Can anyone explain me how may I build a solution for this?? Any help is appreciated..
 
I have used the following approach. Create a table to hold all of the names of the command buttons. Then create another table that joins a user type to those command button names that the user type is allowed to use (ie the privileges for that user type).

In the on open event of your main menu form you would the loop through the command buttons on the form and make them visible or not depending on the type of user logging in.
 
Thank for the reply
I still find it difficult to make command buttons enable/disable based on the login. hence i attach the login file for your review. I need your help.

Thank you.
foxtet
 

Attachments

I'm sorry but I don't have Access 2007/2010 here at work (only Access 2003), so I will have to take a look at your database tonight from home.
 
I took a look at your database, but I don't see where you set up the tables I suggested in my earlier post:

Create a table to hold all of the names of the command buttons. Then create another table that joins a user type to those command button names that the user type is allowed to use (ie the privileges for that user type).

Additionally, your main form opens up to a search form rather than a form that has various command buttons that describe actions that a user can conduct.
 

Users who are viewing this thread

Back
Top Bottom