Open Exclusive

J

Joan Wild

Connie said:
Thanks for your reply Joan.

Then what do I need to do to make sure no one else gets into the database
when a certain user is logged on exclusively, as each user has their own
FE
in their profile (they use remote access - Terminal Services). If I have
a
shortcut on this user's desktop that includes the /excl it will open her
copy of the FE exclusively, but that won't effect the other FEs ..
correct?
Correct.

So how do I prevent others from getting into the database when she's in?

Is it that when she is in at all times that no one else can; or is it just
for some process she must run?
 
C

Connie

I'll have 2 icons on her desktop ... she'll only use the exclusive one when
she has do her reconciling & it's important that no one else is in the
database editing or adding records at that time.
 
J

Joan Wild

Connie said:
I'll have 2 icons on her desktop ... she'll only use the exclusive one
when
she has do her reconciling & it's important that no one else is in the
database editing or adding records at that time.


Do you have two icons so that one can have the /excl switch in it? If so, I
wouldn't bother with that as it won't keep others out. If it's a completely
different frontend, then I understand the two icons.

When she needs to do the reconciling, you could place an exclusive lock on
the backend, run the necessary code, and then close the connection.

In code check for the existence of the ldb file in the backend folder (that
would indicate that someone is using it). If the ldb doesn't exist, then
Dim dbs as Database
Set dbs = OpenDatabase("path to backend.mdb", True)

That will open the backend database exclusively. Then do the reconciling.
Once finished

dbs.close
set dbs = nothing
 
C

Connie

Ok I'll try that code (but I have a couple of questions below) & yes that's
the purpose of 2 icons (same FE 1 using /excl switch) ... so I will stay
with one.

I should also add that I have setup 2 groups ... one for data entry which
she (& others) will use normally & one when she needs to reconcile. This
way I can control, via code, which forms/reports are enabled based on login.
So I should remove, in the User-Level Security, exclusive permission from
the FE database & add it to the BE for the Reconcile group. correct?

Also, when she logs in with Reconcile login, will it work ok if I put the
code that opens BE exclusively in the OnOpen of the Switchboard of the FE?
And will it keep the BE exclusive until she closes the FE? The reason why I
ask this, is I've noticed when users are in there & they open the FE ... I
see the FE's ldb. Not until they go into a form or report will I see the
BE's ldb .. & then when they close the form or report the BE's ldb
disappears. I need to prevent anyone getting in at all while she's in the
FE reconciling as she does various operations each one contingent on the
previous so it's imperative that no one gets into the database & change
something.

Sorry for all the questions, but I just can't seem to grasp this
security/multi-users with reference to exclusive, but I'm trying ... with
your help! :)

Thanks so much Joan. I really appreciate all the help you have given me ...
with this & other threads!
Connie
 
J

Joan Wild

Connie said:
I should also add that I have setup 2 groups ... one for data entry which
she (& others) will use normally & one when she needs to reconcile. This
way I can control, via code, which forms/reports are enabled based on
login.
So I should remove, in the User-Level Security, exclusive permission from
the FE database & add it to the BE for the Reconcile group. correct?
Yes

Also, when she logs in with Reconcile login, will it work ok if I put the
code that opens BE exclusively in the OnOpen of the Switchboard of the FE?

Are you saying she has two different logins? That isn't necessary; just put
her username in the two groups.

That's OK to put it in the switchboard, but realize that as long as she has
the FE open (whether it's for data entry or reconciling), no one else will
be able to go in.

It would be better if you put the code in the form where she does the
reconciling.
And will it keep the BE exclusive until she closes the FE?
Yes

The reason why I
ask this, is I've noticed when users are in there & they open the FE ... I
see the FE's ldb. Not until they go into a form or report will I see the
BE's ldb .. & then when they close the form or report the BE's ldb
disappears.

That's correct.
I need to prevent anyone getting in at all while she's in the
FE reconciling as she does various operations each one contingent on the
previous so it's imperative that no one gets into the database & change
something.

Perhaps you could give the Reconcile group a separate form where she could
lock the backend (don't forget to test for the backend ldb - if it exists,
she'll have to get everyone out, or you can use code to kick out other
users). Search google for methods to kick out users - Arvin Meyer has an
example on his site called kick em off - www datastrat.com
 
C

Connie

You didn't ... initially I was trying to intercept the error msg that one
gets when trying to open a db that is already opened exclusively. Then this
whole thing took a life of its own!! ;)

I really appreciate, TC, all the help you have given me!
Thanks & have a great day!
 
C

Connie

Joan Wild wrote
(snip)
Are you saying she has two different logins? That isn't necessary; just put
her username in the two groups.

Yes but then I couldn't check to see if she's logging in to do the
reconciling as there isn't a way to read the group that is logged on, only
the user ... correct?
That's OK to put it in the switchboard, but realize that as long as she has
the FE open (whether it's for data entry or reconciling), no one else will
be able to go in.

While she's in there to reconcile I don't want anyone to get in so that will
work fine (as log as she logs in with the login for reconciling)
It would be better if you put the code in the form where she does the
reconciling.

I can't because it's not just 1 form, she works with several forms & reports
& while she's switching back & forth I don't want someone to "sneak" in.

(snip)
Perhaps you could give the Reconcile group a separate form where she could
lock the backend (don't forget to test for the backend ldb - if it exists,
she'll have to get everyone out, or you can use code to kick out other
users). Search google for methods to kick out users - Arvin Meyer has an
example on his site called kick em off - www datastrat.com
ahhh ... great idea!!!!! This sounds like it would solve all my problems
regarding reconciling!! Thank you so much!! Yes I've seen a couple of
those examples.

Thanks Joan, for all your suggestions!! I really appreciate it!!
Connie
 
J

Joan Wild

Connie said:
Joan Wild wrote
(snip)

Yes but then I couldn't check to see if she's logging in to do the
reconciling as there isn't a way to read the group that is logged on, only
the user ... correct?

No you can't do that, since a 'group' doesn't log on. However, you can
check to see if the current user is a member of some group, and then
proceed. There's a function in the FAQ for this.
 
C

Connie

Joan Wild wrote
(snip)
No you can't do that, since a 'group' doesn't log on. However, you can
check to see if the current user is a member of some group, and then
proceed. There's a function in the FAQ for this.
That may come in handy ...
Thanks again Joan!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top