Popup Menus Provide Quick, Context Sensitive
Options in Microsoft Access
Give your Microsoft Access database applications a more Windows-like
feel with Pop-up Menus that appear with the right mouse click button (or
any event you specify).
The Popup Menu control displays a Windows-style context sensitive
menu when a user right clicks on a control or form:
Using the Popup Menu control
Design the Menu Items
Simply add the Pop-up Menu control to your form and interactively set
its properties. You can specify each menu item individually:
- Text to display
- Point size
- Backcolor, if Windows XP Themes is not enabled
- Graphic (BMP, GIF, ICO, or JPG format)
- Selected status (check mark)
You can also add horizontal lines to separate menu items:
With the Windows XP Themes option selected, it matches the appearance
of your user's Windows settings.
Display the Popup Menu
Once the Popup Menu is designed, display it with its Show method.
Typically, a popup menu appears when the right mouse button is
pressed over the form or a particular control. Select the control you
want to add the popup menu, and invoke the Popup Menu's Show method on
its MouseDown event for the right mouse click (Button = 2).
Handle the User's Selection
The Popup menu generates an OnSelect event when the user selects a
menu item. Just invoke your action based on the selection.
Complete Programmatic Control
With VBA, you can programmatically modify your Popup Menu. Customize
individual menu items, enable or disable them, add or remove items,
change graphics, etc. so you can display exactly what you want based on