Results 1 to 4 of 4
  1. #1
    AzizSader is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    37

    disable shift key

    Dear All


    How to disable shift key in access 2013

  2. #2
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    528
    You can use the AllowBypassKey property to specify whether or not the SHIFT key is enabled for bypassing the startup properties and the AutoExec macro. For example, you can set the AllowBypassKey property to False to prevent a user from bypassing the startup properties and the AutoExec macro.

    Code:
    Sub SetBypassProperty()
    Const DB_Boolean As Long = 1
        ChangeProperty "AllowBypassKey", DB_Boolean, False or True
    End Sub
    
    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
        Dim dbs As Object, prp As Variant
        Const conPropNotFoundError = 3270
    
        Set dbs = CurrentDb
        On Error GoTo Change_Err
        dbs.Properties(strPropName) = varPropValue
        ChangeProperty = True
    
    Change_Bye:
        Exit Function
    
    Change_Err:
        If Err = conPropNotFoundError Then    ' Property not found.
            Set prp = dbs.CreateProperty(strPropName, _
                varPropType, varPropValue)
            dbs.Properties.Append prp
            Resume Next
        Else
            ' Unknown error.
            ChangeProperty = False
            Resume Change_Bye
        End If
    End Function

  3. #3
    AzizSader is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    37
    thank you my dear teacher

  4. #4
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    528
    Hi Aziz
    If this function has been activated can not access to the design tables only by VBA

Please reply to this thread with any new information or opinions.

Similar Threads

  1. disable shift key on startup form
    By AzizSader in forum Forms
    Replies: 2
    Last Post: 08-12-2014, 11:34 AM
  2. shift + f2
    By willifords in forum Access
    Replies: 1
    Last Post: 07-10-2014, 05:17 PM
  3. Disable Shift Control
    By gstylianou in forum Access
    Replies: 1
    Last Post: 06-25-2014, 08:29 AM
  4. Password Form With Enable/Disable Shift Key
    By burrina in forum Code Repository
    Replies: 0
    Last Post: 12-24-2012, 10:53 PM
  5. Code Error on Form To Disable Shift Key
    By burrina in forum Forms
    Replies: 3
    Last Post: 12-24-2012, 07:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums