Using Homemade Accelerator Keys in Restricted Environments


Now that you've gone to all the trouble of disabling a combination of the database window, menus , toolbars , shortcut menus, and the special keys from the database, you'll probably find that it's difficult to develop and administer your database. To assist you with these tasks , I have deliberately set up the frmStartupProperties form in such a manner that you can easily use it to modify the startup properties in your database (and modify them back again). You can augment this form by allocating your own accelerator key sequences to open this form. Another accelerator key sequence that is described below will allow you to open any form or report in the database in design view without having a design view menu or toolbar option. To do this, build a macro that stores all your database accelerator keys:

  1. Open the database window.

  2. Select Macros.

  3. Create a new macro (unless you already have an Autokeys macro).

  4. Choose View ˜ Macro Names.

  5. In the macro name column, enter ^ Q (see Figure 2-9).

    click to expand
    Figure 2-9: Setting up the Autokeys macro to make getting around Access a little easier.

  6. In the Action column, select OpenForm.

  7. Select the frmStartupProperties form in the Action Arguments pane (near the bottom).

  8. Now start a new line and enter ^ D into the Macro Name column.

  9. Enter RunCommand in the Action column.

  10. Select DesignView in the Action Arguments pane.

  11. Now save the macro and call it Autokeys.

Note  

Accelerator keys are stored in the database in a macro that is always called Autokeys. From now on, you can type the following two key sequences: CTRL+Q to open the frmStartupProperties demonstration form and CTRL+D to open any object in design view. You can even add triple key sequences like CTRL+SHIFT+X if you want extra security on these key sequences.

Now if you want to use accelerator keys to open the frmStartupProperties demonstration form in your database, all you need to do is import the form and the Autokeys macro into your database. If you set the AllowBypassKey property to False, you can still open the frmStartupProperties startup options form by using the CTRL+Q key sequence. Test the accelerator keys and demonstration form before setting the AllowBypassKey property to False.




Real World Microsoft Access Database Protection and Security
Real World Microsoft Access Database Protection and Security
ISBN: 1590591267
EAN: 2147483647
Year: 2003
Pages: 176

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net