Tuesday, January 26, 2010

assign_04


ATTACHING MENUS TO

FORMS AND REPORTS

When you have created your custom menus,you must attch them to their corresponding forms and reports. This is a simple matter of setting the Menu Bar property for each form and report.In Acces for Windows, you can change the menu bar of a form and runtime using VBA code

Creating Shortcut Menus

Microsoft has added an exciting new feature to Access for some Windows:Shortcut menus.

Shortcut menus are menus that appear when you right click on an object.You have probably been taking advantage of shortcut menus in many applications including the design environment of Access 2.0,now you can give your application’s users this valuable time-saver.

You can assign shortcut menus form and you can assign a different shortcut menu to every control on a form.You create shortcut menusthe same way you create standard menus: by first creating the top-level menu macro and then creating the submenu macros. You can create only one AddMenu action for the top-level macro. If you create more than one top-level menu by using additional Add menu actions.

Creating menu accelerator keys by using

Key Assignment macros

Although menu access keys(the keys that open pull-down menus when combined with the Alt key) and menu item hot keys(the shortcut keys for selecting a menu item from an open pull-down menu make it easy to select a menu item power users are always looking for faster shortcuts.To make your application as efficient as possible you need to give your users the ability to select an item with one key or key combination an accelerator key.

Unlike menu item hot keys which are only active while a pull-down menu is open accelerator keys are active at all times. An accelerator key may be one key such as the Delete key or it may be a key combined with Shift, Ctrl or Alt.

Creating intuitive accelerator keys

Microsoft offers a program for designating applications as Microsoft Office Compatible. All Microsoft Office Compatible applications share three characteristics:

*Common menu structures

*Common menu structures

*Common accelerator key definitions

For an application to be certified Microsoft Office Compatible. It not only needs to have accelerator keys but the accelerator keys must also be consistent with the other Microsoft Office products.For example, if you have a print menu item,you must use the Ctrl+P accelerator key. Even if you don’t plan on submitting your application for Office Compatibility certification,you should still attempt to use the same accelerator keys as Office,where applicable. This cnsistency lowers the learning curve for your application and helps your users become more productive in less time.

Adding accelerator keys to your application should be simple; unfortunately,it’s not.If you attempted to add accelerator keys to your application while using Access 2.0and became extremely frustrated,be aware that you will be frustrated again. If you attempt to add acceleratorkeys to your Access for Windows application.