Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2005
    Posts
    3

    Unanswered: AllowBypassKey to bypass the Shift key

    Hi all,

    I am creating an .mde file in an Access 2003 database. I am trying to prevent a user from being able to access the database window by pressing the Shift during startup, thus ensuring that the user is not able to view data in linked tables.

    I have seen various snippets of code to allow the "AllowBypassKey" property to be changed, but I am not sure where to place this code to achieve my objective.

    The only alternative that I have been using up until now is to dynamically link tables when the main form opens and then delete them when it closes, but this can be quite slow and cumbersome over a network.

    Thanks in advance.

    Jerry.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I don't think the shift bypass works on MDE files.
    Create a backup and give it a try
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2005
    Posts
    3
    Thanks for the comment.

    My problem, however, is that I'm not sure where to place the code. Should it be in the open event of the Startup form, or perhaps somewhere else?

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Re-read my last post matey.
    If you are using an MDE then you don't have to worry about the bypass key. I advise you give it a go for yourself with a backup of your db
    George
    Home | Blog

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    The bypass method is usually put in the form which initially opens or initial startup code. Make sure you have a method to disable it and I would make several backups of your mdb without the code in it.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Seriously, just try bypassing security with the shift key on an MDE! This is the last time I'm going to say that in this thread

    If you have decided that you want to use an MDB then Paul is right - it should really be on the startup forms on open or alternatively in a function called by your AutoExec macro before any form is loaded.
    Either way - this method of security implementation is flawed.
    George
    Home | Blog

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I agree George. I never use this method as I also think this method of security impementation is flawed.

    There is an easy crack for it with a piece of code I found which bypasses the startup form/routine.
    Last edited by pkstormy; 08-02-07 at 11:00.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  8. #8
    Join Date
    Jan 2005
    Posts
    3
    George, I seem to have upset you, and I'm not sure why. That certainly wasn't my intention.

    My experience with mde files is that, if you open it while pressing the Shift key, the database container opens up.

    This then gives unrestricted access to all data in any linked files, as well as queries and macros. This access also gives the user the ability to edit the data.

    Access is given to the Forms, Reports and Modules tabs, but changes cannot be made in these areas.

    It is the access to the linked files that has been the source of my concern.

  9. #9
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I like to also look at how easy it is for developers to get into an mdb and make code changes. Using the bypass shift method can sometimes be a pain to get in and make a simple change. If you want another way to prevent users from easily getting behind the scenes (but still doesn't solve the use of the shift key), check out this example:
    http://www.dbforums.com/showpost.php...0&postcount=20

    It's a method I like to use which essentially opens a MainformBackGround and then utilizes popup, modal forms. This way the user can't click on the upper MSAccess menus and it sort of hides the tables.

    I would seriously try to avoid the bypass shift key method. I used to be all excited about using it but then found that most users don't know about using the shift key and those that do, don't really care. I very rarely find a user who tries to get behind the scenes and edit data directly in the table. If they do, then they are usually purposely trying to do something they really shouldn't be doing and I can usually track them down sooner and later.

    ** You can also set the properties of each table to hidden (right-click on the table and check the hidden box.) This is a nice little technique and you have to go to Tools -> Options - > View and then check Hidden objects to see the tables. But hidden tables don't work well with Word 2003 mailmerges (you can't mailmerge a hidden MSAccess table in Word 2003 but you CAN do it with Word 2000). If that's something you need to be concerned about. And also check out the options in the Tools -> Startup -> Display Database Window to set it so they can't see any of the tables.

    Like George recommended though, always make an mde file for the users to utilize.
    Last edited by pkstormy; 08-02-07 at 21:40.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •