Using Context-Sensitive Menus

<< Click to Display Table of Contents >>

Navigation:  Other Topics > Smart Access 1996-2006 > Dec-2002 >

Using Context-Sensitive Menus


Wayne Wallace


One of the best things about the latest versions of Windows is the pop-up menus

that spring up when you right-click on an object. Wayne Wallace shows how you can

add this same capability to your Access 2002 applications.


HOW would you use this feature? I’ll bet that you have at least one form

with a list box on it that users can select an entry from. Perhaps it’s a

list of order types or customer numbers or some other list of items

where you don’t want your users to be able to enter any value. With a context sensitive

menu, your users would be able click on the list box and get a menu

that includes options like “Add a new entry” or “Update/View Current

Selection” (see Figure 1, on page 4).


There are two benefits to adding pop-up menus to your form design: First,

you’re adding additional functionality to your application in a way that’s

consistent with Windows standards; second, the functionality doesn’t take up

any space on your form. While you could add a button to let users add new

entries to the list box or view the currently selected item in the list, you don’t

have to add those buttons if you’ve made that functionality available in a popup

menu. The functionality in the pop-up menu is probably not part of the

form’s core purpose, so adding buttons to support these features just clutters

the form and gets in the way of users doing their job. In addition, any rightclick

functionality will only be found by users experienced and comfortable

enough with Windows to use their right mouse button. These are exactly the

users who should be targeted with additional functionality that isn’t core to

the form.


Of course, if the functionality is core to the form there’s no reason why

you can’t make it available from a pop-up menu and a button on the form.


Read more here:

Using Context- Sensitive Menus