MS Access Forum / Modules / DAO / VBA / May 2005
Disable access to the database window
|
|
Thread rating:  |
Leif - 04 May 2005 18:04 GMT 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.
Leif - 04 May 2005 18:34 GMT 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.
> I would like to disable access to the database window for a general user, but > allow an admin user access. [quoted text clipped - 10 lines] > > Any suggestions? Thanks. Klatuu - 04 May 2005 18:50 GMT 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.
> I would like to disable access to the database window for a general user, but > allow an admin user access. [quoted text clipped - 10 lines] > > Any suggestions? Thanks. Leif - 04 May 2005 20:41 GMT 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
> 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 [quoted text clipped - 25 lines] > > > > Any suggestions? Thanks. Klatuu - 04 May 2005 20:46 GMT 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.
> Klatuu, > [quoted text clipped - 42 lines] > > > > > > Any suggestions? Thanks. Leif - 04 May 2005 23:28 GMT 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.
> 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 [quoted text clipped - 46 lines] > > > > > > > > Any suggestions? Thanks. Klatuu - 04 May 2005 23:38 GMT 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.
> 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 [quoted text clipped - 50 lines] > > > > > > > > > > Any suggestions? Thanks. Leif - 05 May 2005 00:52 GMT 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.
> Leif, > The only time there is extra time overhead is when you have the Front End [quoted text clipped - 61 lines] > > > > > > > > > > > > Any suggestions? Thanks. Klatuu - 05 May 2005 14:18 GMT Best of luck to you.
> 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, [quoted text clipped - 71 lines] > > > > > > > > > > > > > > Any suggestions? Thanks.
|
|
|