Disable Shift Key in Access 2000 , VB (version 6)

Posted on 2003-11-30
Last Modified: 2009-12-16

I know it is possible , i looked arround for a lot of solutions via google and non of them worked in my access 2000 vb.
i want to be able to disable the shift key for an access db and when i want - i want to be able to enable the shift key, can you help me with a working vb code ?

Question by:DoRi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 9845223
Look in Help for the AllowBypassKey property.


Accepted Solution

Benjamin_Luk earned 250 total points
ID: 9848311
Put following code under modle:
Then use macro [run code] to call it
1. Diable it set [Function Name]=DisShift()
2.Enable it set [Function Name]=Enshift()

Function DisShift()
    ChangeProperty "AllowBypassKey", dbBoolean, False
End Function
Function EnShift()
    ChangeProperty "AllowBypassKey", dbBoolean, True
End Function
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Database, prp As Property
    Const conPropNotFoundError = 3270
    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True
    Exit Function
    If Err = conPropNotFoundError Then  ' Property not found.
        Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
        dbs.Properties.Append prp
        Resume Next
        ' Unknown error.
        ChangeProperty = False
        Resume Change_Bye
    End If
End Function



Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle Mulit-site configuration 28 68
Error 438 6 47
database access query MSSQL 3 42
Access 2003, find all instances of database ODBC 3 39
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question