How do I prevent  the users of MSACCESS 2003 runtime projects from opening in the development window with the "shift" key?

Posted on 2005-04-18
Last Modified: 2012-06-21
I am writing small MS Access 2003 databases for various applications then packaging as a "Runtime' application. I want to secure the runtime version of the db so that no hot key will allow the user with MS ACCESS to open the db in a developer window. Is this possible when packaging or is there another software available for securing the database?
Question by:Big_Harry1
    LVL 26

    Expert Comment

    LVL 26

    Expert Comment

    It's worth noting that, even if you secure the bypass key (shift), a user with a full installation of Access could create a new database and import your objects into theirs....

    You need to consider Access User-Level Security (ULS) to help secure your objects, too.

    LVL 39

    Expert Comment

    Go to tools->Customize; select the Toolbar tab; click on new and create a new toolbar.   Add the commands you want your users to have.  Go to Tools->Startup; in the Menu Bar window, select the menu bar you just created; turn off "display Database Window", "Allow Built in Toolbars", "Allow toolbar/menu changes", "Allow Full Menus", "Allow Shortcut Menus", "Use Special Keys" (after clicking advanced).  Save the project then create an MDE file, Tools->Database Utilities->Make an MDE file. Distribute the MDE file.
    LVL 26

    Accepted Solution

    thenelson - thisoption will disable the database window etc, but will still allow a user access to the back end by holding down shift when opening the database.

    However, following thenelson's advice will add a few extra touches that will help.
    Also, deploying as an MDE will protect your code and make teh database smaller.
    LVL 39

    Assisted Solution

    Oops, sorry.  To disable the shift key add this code to run in the autoexec macro  (from Access help for AllowBypassKey) Close Access then the next time you reopen it the shift key will be disabled:

    Sub SetBypassProperty()
    Const DB_Boolean As Long = 1
        ChangeProperty "AllowBypassKey", DB_Boolean, False
    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

        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
    LVL 26

    Expert Comment

    The first post has a different, more secure version - with a fourth arguement:

    A Variant (Boolean subtype) that indicates whether or not the Property is a DDL object. The default is False. If DDL is True, users can't change or delete this Property object unless they have dbSecWriteDef permission.

    LVL 48

    Expert Comment

    by:Gustav Brock
    You could go to John Colby's site:

    and get C2DbProperties.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now