Results 1 to 4 of 4

Thread: Shift Key

  1. #1
    Join Date
    Feb 2013
    Posts
    14

    Unanswered: Shift Key

    Hi

    I have seen many different ways to switch off the SHIFT key override feature which prevents users from using the SHIFT key on DB start-up to access the tables, forms, etc. in design mode.

    Can someone offer a simple solution to this please.

    I don't want to set a password or a button. Just insert code that takes effect the next time the DB is started. I understand the need to make suitable backups in doing this.

    Thanks
    Gary

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can use:
    Code:
    Sub DisableBypassKey()
    
    
        Dim pty As DAO.Property
        
        Set pty = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, False)
        CurrentDb.Properties.Append pty
        
        
    End Sub
    Have a nice day!

  3. #3
    Join Date
    Feb 2013
    Posts
    14
    Thanks Sinndho

    Where do I post this?

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    In any standard module, then you call it from the immediate windows (Ctrl+G) by typing:
    DisableBypassKey + then Enter key.

    If you want to re-enable the Shift key, type this in the immediate windows:
    CurrentDb.Properties("AllowBypassKey").Value = True + the Enter key.
    Have a nice day!

Posting Permissions

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