Lock/Unlock Controls in Form

bokarinho

Registered User.
Local time
Tomorrow, 00:42
Joined
Mar 31, 2010
Messages
38
Hello,

I need some piece of advice here. I have a database that will be put into a network share so to be accessed by some users maybe at the same time. In order to achieve some security i have seperated users into some groups. Well i have a main form that according to the user logging the database some controls will be locked and others not. For other users all will be unlocked. I know well how to achieve that, but my question is the following. Say that firstly the user opens the forms and unlocks all the fields because he must have this kind of access. After a while the second user logs in and locks the same fields because he should not have the access. Does this locking affect the first user? They both open the same form. Do i have to make two duplicate forms instead? One with locked and onother with unlocked? I dont want to do that. I want my one main form to handle both. I want to know if the locking/unlocking from one user affects the other user if they are on the database at the same time. Thanks.
 
The way you describe your situation, it would seem that you have not implemented the split file deployment method reccommended by Microsoft for deploying Access databases.

If you want to accomplish what you want, then you need to consider "splitting" your database. There is an option in Access for doing this. Here is one link (a Google search will produce many more) that might shed some light on the subject.
http://databases.about.com/od/tutorials/ss/splitaccessdb.htm

While splitting your database, you will be creating a backend file that only contains the tables of your database and a Front-end file that contains everything else.

To deploy your applicaiton you simply have the backend file on a shared network drive and then provied each user with their own copy of the front-end file which is linked to the tables in the backend file.

Once this is done, each user will be using their own database file but all will be accessing the same data. This will eliminate your concerns about how your main form opens and which controls are locked for each user.
 
Thanks a lot you made it clear to me. That is the best way. Thanks again!!!
 
While splitting the database is indeed a good idea, this would work either way.

Each instance of a form being open is unique. Having one person use it with full access and another with limited access wouldn't cause any problems.
 

Users who are viewing this thread

Back
Top Bottom