UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Open Database As Read-only, Access 2010    
 
   
leessc557
post Sep 26 2016, 04:26 PM
Post#1



Posts: 1
Joined: 26-September 16



Hi,

I have a very basic access database with a few forms and tables and one report.
The database is on the shared drive and has been split to back end and front end.
The user will go to the front end on the shared drive to get to the database (no local deployment)

I would like to set the permissions such that when a user is in the database, other users that log in can open it, but only in read only mode. I would also like the database to warn the user that the file is read only before any of the forms open up.

Here is what I have tried, but have been unsuccessful:
Exclusive setting: it locks the database when a user is in it, but this does not allow any read only access for others.
Shared Setting: I tried it with all records locked and edited record locked. This unfortunately only the user that a record has been changed by someone else AFTER changes have been made. I would like the database to warn the user that its read only BEFORE a form opens up and not accept any changes.

Appreciate your help.
Thank you,
Go to the top of the page
 
DanielPineault
post Sep 26 2016, 05:51 PM
Post#2


UtterAccess VIP
Posts: 5,452
Joined: 30-June 11



See if the following help at all:

http://www.devhut.net/2010/10/18/ms-access...bles-read-only/
Go to the top of the page
 
HiTechCoach
post Sep 26 2016, 10:13 PM
Post#3


UtterAccess VIP
Posts: 18,993
Joined: 29-September 03
From: Oklahoma City, Oklahoma


It is possiblew to do what you ask.

Daniel 's link shows how to allways make the database ready only. Not really what yiu are asking to do.

If I understand you correctly, The first person to open the database will get full read/write access tot eh tables. ALadditional users that open the database will be set to ready only. This remains until all users exit the database.

Not an ideal solution for a multi-user database but it is possible with some VBA coding.

Here is how I would do it.

1) when a user logs in you check to see if any other user has it exclusive. If not then set that user's exclusive field to true.
2) Forms that need lock will use the On Open event to see is they are the exclusive user. Is not then set the form to not allow any adds/edits/deletes.
3) As each users exits, the flag field is cleared.

For this to work best you need to be sure that the fron end is compiled. It also will need locked down. I like to also force access into Runtime mode. If you don't do lock it down, a user can easily get around the security and edit the tables.
Go to the top of the page
 
JonSmith
post Sep 27 2016, 02:33 AM
Post#4



Posts: 3,161
Joined: 19-October 10



May I ask why you wish to do this as I feel that affects the solution?

This seems to me like we are being given the answer to a problem and asked how to do it and I would like to know what the problem is as perhaps there are other answers?
Go to the top of the page
 
DanielPineault
post Sep 27 2016, 07:46 AM
Post#5


UtterAccess VIP
Posts: 5,452
Joined: 30-June 11



Another idea is when a user logs in, make the system log their username into a table if it is empty (if there is already a name, it is because there was someone in it already when they opened it). The part of the form open event you check the current user's name against the table value. If they match the AllowEdits, AllowAdditons, ... = True, otherwise False. Then when they close the db you delete the name entry from the table if it matched the current user's name.

But I would ask why you need this type of setup? This kind of defeats the whole purpose of having a multi-user database, no?! I'm thinking more is going on here, and this probably isn't the true answer to your problem. (I think I have the same concern as JonSmith)
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 05:59 AM