Results 1 to 12 of 12
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disable the ByPass key (97)

    Attached is a sample db that will let you have better control over the ByPass (Shift) key. It will help you keep the Riff Raff out. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Special thanks to Jim Bulger for sharing this at another Access forum.

    Enjoy!

    Tom
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Disable the ByPass key (97)

    Hello Tom,

    In some circumstances it is nice (from the viewpoint of the programmer) to disable the Shift key as a bypass. In that case, the code in your sample is very handy.

    But remember that it is *not* a substitute for Access security. If you don't secure the database, people ("riff raff") will still be able to import database objects (tables, ...) into another Access database.

    Regards,
    Hans

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the ByPass key (97)

    Can you post the link to the other forum (as long as it doesn't break any rules here)? <img src=/S/duck.gif border=0 alt=duck width=23 height=23>

    And thanks (you and Jim) for the file example!

  4. #4
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the ByPass key (97)

    Hans,

    An excellent point! I guess this is more a technique to keep the honest guys honest.

    Thanks,

    Tom

  5. #5
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the ByPass key (97)

    Paul,

    The link is here.

    If it's inappropriate for posting, I'm sure one of the moderators will kindly remove it. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Tom

  6. #6
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Disable the ByPass key (97)

    There are other ways to do this as well if you do not want to use send keys and the commands at startup. The below code also disables other features as well.

    Sub SetStartupPropertiesNone()
    Const DB_Text As Long = 10
    Const DB_Boolean As Long = 1
    ChangeProperty "StartupShowDBWindow", DB_Boolean, False
    ChangeProperty "StartupShowStatusBar", DB_Boolean, False
    ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
    ChangeProperty "AllowFullMenus", DB_Boolean, False
    ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
    ChangeProperty "AllowSpecialKeys", DB_Boolean, False
    ChangeProperty "AllowBypassKey", DB_Boolean, False


    End Sub

    I use this routine to essentially allow users to have full read - write rights to all objects, however, don't give them the ability to get to objects to do anything. They need full access to run pre-set queries that modify data in tables. The database is also saved as an .MDE with a top level password... however, I digress.


    Actually, It is quite easy to re-establish the shift bypass in a database if it has been disabled unless you change the object itself. Microsoft explains how to do this in one of its white papers on security.

    As Hans stated, a user could still import the objects to another database......
    Regards,

    Gary
    (It's been a while!)

  7. #7
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Disable the ByPass key (97)

    Hans,

    A question for you. Other then the normal access security, are there any other ways to prevent users from importing the database objects to another database?

    I have saved a database as a .mde and put on a top level database password. I am not using access security to create named users / groups. The below code is also used to lock up the database during use.

    Without using security for groups and users, do you know of any ways that would prevent tables and queries from being imported to another database?



    Sub SetStartupPropertiesNone()
    Const DB_Text As Long = 10
    Const DB_Boolean As Long = 1
    'ChangeProperty "StartupForm", DB_Text, "Customers"
    ChangeProperty "StartupShowDBWindow", DB_Boolean, False
    ChangeProperty "StartupShowStatusBar", DB_Boolean, False
    ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
    ChangeProperty "AllowFullMenus", DB_Boolean, False
    ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
    ChangeProperty "AllowSpecialKeys", DB_Boolean, False
    ChangeProperty "AllowBypassKey", DB_Boolean, False
    MsgBox "Design Access Disabled"

    End Sub
    Regards,

    Gary
    (It's been a while!)

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Disable the ByPass key (97)

    I'm not an expert in Access security, so I hope others will jump in.

    If you have set a database level password, anyone wanting to import tables/queries from the database would need the password. But I gather that this password is not all that hard to crack; there are password cracking services.

    Making a .MDE means that forms, reports and modules are secured.

    The other measures you describe (disable bypass key etc.) have no bearing on importing tables/queries; they lock the interface as much as possible.

    Regards,
    Hans

  9. #9
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the ByPass key (97)

    Thanks Tom! Looks like a lot of the crew from the element k jounals forum. I wonder what ever happened to that forum (I was JoeK on that forum). The last time I tried to connect I couldn't.

  10. #10
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Old Element K crowd

    It is. Jim Hare was nice enough to put together the site and contacted as many of us as he could.

    If Element K had given us some idea of what they planned, we could have had a better transition. Their loss.

    Hope to see you over there sometime, Joe, er, ah, Paul. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Tom

  11. #11
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Old Element K crowd

    Good old Jim. Wow, you mean they actually planned that debacle? Ooops, getting off topic here. C'ya

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Disable the ByPass key (97)

    On the contrary, feel free to post links whenever you need to ... as long as they don't violate <!rule=8>Rule 8<!/rule> or <!rule=18>Rule 18<!/rule>. It's only posting copyrighted material or links to inappropriate or malicious sites that will earn you <img src=/S/warts.gif border=0 alt=warts width=59 height=24> from the moderators.
    Charlotte

Posting Permissions

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