• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

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

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?
  • 4
  • 2
2 Solutions
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.

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.
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
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
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.

Gustav BrockCIOCommented:
You could go to John Colby's site:


and get C2DbProperties.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now