Disable access to the database window

G

Guest

I would like to disable access to the database window for a general user, but
allow an admin user access.

I know about the Special Access keys under start up, but my understanding is
that this is a global, rather then a user specific, setting.

I was looking for a keypress event that would trap all Access keys, but that
seems to be form specific.

Another idea, perhaps I could disable F11, but bring up the database window
using code? If this was possible I could place it on a menu, since the admin
user has a different menu.

Any suggestions? Thanks.
 
G

Guest

Never mind, I've discovered the answer to my question. If I use the code

DoCmd.SelectObject acTable, , True

I can bring up the database window even though F11 has been disabled.
 
G

Guest

The Special Access keys is global in a sense. It is specific to that mdb.
You could distribute a different mdb to the users that you do for an admin
user. That is kind of klugy. There is, however, another solution. It is
the AllowBypassKey Property. There is a pretty good example in VBA Help.
The way I have implemented it requires some sort of security implementation.
What I do during my startup routine is check to see if the user has admin
authority. If he does, then I set AllowBypassKey to True, otherwise, I set
it to False. Notice in the Help file that this does not take effect until
you close and reopen the mdb. So, for an admin person to get into the
database, they have to go in two time. Once that recognizes them as an admin
user, and set the property to True. Then close the mdb, and open it with the
Shift key down and they are in. This also means your app has to be
constructed so that a user cannot get direct access to anything other than
the object you allow them.
 
G

Guest

Klatuu,

Actually I have used the AllowBypassKey Property in another db project.
However, in doing so you do open up a "window of opportunity". If the user
enters with shift, after you have exited, then they get in as well. I've
mimized this chance, in my other application, by adding a keypress event to a
particular control that set the AllowBypassKey. This way I only open the
window when I need to.

However, to close even this window, as I've recently learned, set
AllowBypasskey to FALSE, then use either permissions (checked in an Autoexec)
or a backdoor (like a special key sequence) to bring up the database window
programmatically.

Regards,
Leif
 
G

Guest

It sound like you have multiple users using the same copy of the mdb. This
is not good. If you are not using a Front End/Back End model, then you need
to move to that.
 
G

Guest

I do. I've had a number of people tell me that, but I've run several years
like this without any particular problem. I've tried splitting it, but I
don't care for the extra time overhead.
 
G

Guest

Leif,
The only time there is extra time overhead is when you have the Front End
and Back End both on a server. It will double your network traffic and cause
a slowdown. The correct way to configure your database is to put the Back
End on the server, and a copy of the Front End on everybody's PC. This will
actually improve performance because the single copy has to take care of
multiple requests. This also reduces performance. Think about it this way.
If you go to a restuarant and they have only one waiter, how much longer will
it take you to get dinner than if there were two waiters?
Sure, a number of people tell you that because it is the correct way to do it.
 
G

Guest

Well, I've read the some access types do not work through link tables.
However, given there is a way around that, I've seem much slower preformance,
even with the FE local. I tried persisent connections, etc., etc.

However, even given that performance problems could be ovecome, then I need
to move the FE to the local machine for new users and distribute the FE to
all when I make a change to the FE. I've heard there is some software to
simplify this process, but it seems to me to be an extra layer of complex
that I do not require.
 
G

Guest

Best of luck to you.

Leif said:
Well, I've read the some access types do not work through link tables.
However, given there is a way around that, I've seem much slower preformance,
even with the FE local. I tried persisent connections, etc., etc.

However, even given that performance problems could be ovecome, then I need
to move the FE to the local machine for new users and distribute the FE to
all when I make a change to the FE. I've heard there is some software to
simplify this process, but it seems to me to be an extra layer of complex
that I do not require.
 

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