By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,218 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

Security question, read only db with subsequent logons

P: n/a
I'm trying to finish implementing security on my database. I have
secured the .mdb with a .mdw file as per the MS security FAQ with no
problems.

The last part of security that I need to implement is that the first
person to open and log on to the database gets to use the database.
Any subsequent log on users will flip into READ-ONLY mode and won't be
able to modify any data.

All my users belong to a 'full-data-access' group that allows them
enough priv's to run the application. I already have VBE code that
inserts a CURRENT_LOGON record when the Switchboard is opened. This
record is deleted when that user exits the system.

I need some code to perform the following logic:
IF anybody_else_logged_in = true
set database to read-only
(maybe revoke full-data-access group and
grant read-only-access group) to this user
else
insert logged_on record into current_logon table
open switchboard
end

TIA
Paul
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I'm too curious to answer the WHY before I answer the HOW on this one

Pieter

"Paul Malcomson" <pm**********@hotmail.com> wrote in message
news:23**************************@posting.google.c om...
I'm trying to finish implementing security on my database. I have
secured the .mdb with a .mdw file as per the MS security FAQ with no
problems.

The last part of security that I need to implement is that the first
person to open and log on to the database gets to use the database.
Any subsequent log on users will flip into READ-ONLY mode and won't be
able to modify any data.

All my users belong to a 'full-data-access' group that allows them
enough priv's to run the application. I already have VBE code that
inserts a CURRENT_LOGON record when the Switchboard is opened. This
record is deleted when that user exits the system.

I need some code to perform the following logic:
IF anybody_else_logged_in = true
set database to read-only
(maybe revoke full-data-access group and
grant read-only-access group) to this user
else
insert logged_on record into current_logon table
open switchboard
end

TIA
Paul

Nov 12 '05 #2

P: n/a
Paul Malcomson wrote:
I'm trying to finish implementing security on my database. I have
secured the .mdb with a .mdw file as per the MS security FAQ with no
problems.

The last part of security that I need to implement is that the first
person to open and log on to the database gets to use the database.
Any subsequent log on users will flip into READ-ONLY mode and won't be
able to modify any data.

All my users belong to a 'full-data-access' group that allows them
enough priv's to run the application. I already have VBE code that
inserts a CURRENT_LOGON record when the Switchboard is opened. This
record is deleted when that user exits the system.

I need some code to perform the following logic:
IF anybody_else_logged_in = true
set database to read-only
(maybe revoke full-data-access group and
grant read-only-access group) to this user
else
insert logged_on record into current_logon table
open switchboard
end

TIA
Paul


Here is a consideration. There is a program called LDBView for A97 that
lets you know who is logged on to the app. I believe in the newer
Access versions there is a method to determine how many people are
logged on. Goto http://groups.google.com, advanced search, group
*Access* and search for info on LDBView and the newer method.

Now you can determine when there is one user vs many users in the system.

You could then create a global variable when the person logs on that
contains the value of acFormEdit or acFormReadOnly datamode.

Now search through the entire app that has a Docmd.OpenForm and put in
the variable for the value of the datamode.

You may have to make an adjustment if you open a form in acFormAdd datamode.

Remember too that variables lose their value if a person goes into debug
mode.

I just noticed you are a master crossposter. Why do you cross post?

Nov 12 '05 #3

P: n/a
I once had that code on a website,
now it's gone..
and the sourcecode with my laptop when it was stolen..
I have been able to reconstruct most of the code, so if anybody wants it on
their site I'll be happy to send it...
I seem to remember a dutch site who still "sport" a version of the code
(which I "stole" from vb advisor anyhow)
Dev would never allow me to put it into the access web anyhow...

--
Pieter Wijnen

When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca
http://allenbrowne.com/

"Salad" <oi*@vinegar.com> wrote in message
news:Ko****************@newsread2.news.pas.earthli nk.net...
Paul Malcomson wrote:
I'm trying to finish implementing security on my database. I have
secured the .mdb with a .mdw file as per the MS security FAQ with no
problems.

The last part of security that I need to implement is that the first
person to open and log on to the database gets to use the database.
Any subsequent log on users will flip into READ-ONLY mode and won't be
able to modify any data.

All my users belong to a 'full-data-access' group that allows them
enough priv's to run the application. I already have VBE code that
inserts a CURRENT_LOGON record when the Switchboard is opened. This
record is deleted when that user exits the system.

I need some code to perform the following logic:
IF anybody_else_logged_in = true
set database to read-only
(maybe revoke full-data-access group and
grant read-only-access group) to this user
else
insert logged_on record into current_logon table
open switchboard
end

TIA
Paul
Here is a consideration. There is a program called LDBView for A97 that
lets you know who is logged on to the app. I believe in the newer
Access versions there is a method to determine how many people are
logged on. Goto http://groups.google.com, advanced search, group
*Access* and search for info on LDBView and the newer method.

Now you can determine when there is one user vs many users in the system.

You could then create a global variable when the person logs on that
contains the value of acFormEdit or acFormReadOnly datamode.

Now search through the entire app that has a Docmd.OpenForm and put in
the variable for the value of the datamode.

You may have to make an adjustment if you open a form in acFormAdd

datamode.
Remember too that variables lose their value if a person goes into debug
mode.

I just noticed you are a master crossposter. Why do you cross post?

Nov 12 '05 #4

P: n/a
but what happens if there's a network error and the CURRENT_LOGON
record is not cleaned up

same problem with the LDB, unless you try to delete it first
actually if there's an LDB, and it can't be deleted, then you have
someone logged in

since you're using the standard switchboard item, just change the
switchboard open code based on the LDB's presence

pm**********@hotmail.com (Paul Malcomson) wrote in message news:<23**************************@posting.google. com>...
I'm trying to finish implementing security on my database. I have
secured the .mdb with a .mdw file as per the MS security FAQ with no
problems.

The last part of security that I need to implement is that the first
person to open and log on to the database gets to use the database.
Any subsequent log on users will flip into READ-ONLY mode and won't be
able to modify any data.

All my users belong to a 'full-data-access' group that allows them
enough priv's to run the application. I already have VBE code that
inserts a CURRENT_LOGON record when the Switchboard is opened. This
record is deleted when that user exits the system.

I need some code to perform the following logic:
IF anybody_else_logged_in = true
set database to read-only
(maybe revoke full-data-access group and
grant read-only-access group) to this user
else
insert logged_on record into current_logon table
open switchboard
end

TIA
Paul

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.