• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Programming > 80. Prevent Users from Disabling Your Startup Options

Prevent Users from Disabling Your Startup Options

Stop users from being able to hold down the Shift key to get to the database window.

After spending all that time developing your database application and then setting the startup options, the last thing you want is for someone to be able to simply hold down the Shift key during startup and then mess around with your application. This hack explores two different ways to prevent this: disabling the Shift key code for Access databases (MDBs) and disabling the Shift key code for Access Data Projects (ADPs).

Access MDB

With MDB files, the hack works by adding a property called AllowBypassKey to the database object. Setting the property to False disables the Shift key, and changing it back to True enables it again. You need to decide on an event to trigger the value change. It could be when a specific user logs into the database or, as in this code example, when a file named AllowByPass.txt is in the same directory as the database:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint