Access Popup Menu API Functions

The following functions, constants, and subs, support the pop up menu capabilities of using the "user32" DLL.

CreatePopupMenu function

 * handle = CreatePopupMenu 
 * Creates a drop-down menu, submenu, or shortcut menu. The menu is initially empty. You can insert or append menu items by using the InsertMenuItem function. You can also use the InsertMenu function to insert menu items and the AppendMenu function to append menu items.

AppendMenu function

 * AppendMenu (hMenu,uFlags,uIDNewItem,lpNewItem)
 * Appends a new item to the end of the specified menu bar, drop-down menu, submenu, or shortcut menu. You can use this function to specify the content, appearance, and behavior of the menu item.

TrackPopupMenuEx function

 * TrackPopupMenuEx(hMenu,uFlags,x,y, hwnd, lptpm)
 * Displays a shortcut menu at the specified location and tracks the selection of items on the shortcut menu. The shortcut menu can appear anywhere on the screen.

DestroyMenu function

 * DestroyMenu(hMenu)
 * Destroys the specified menu and frees any memory that the menu occupies.

Module Contents
Create a module in your Access Database in the VBE (Visual Basic Editor) and place the following in the module.

Form Contents
Place this code in a form and create a button to trigger the drop down menu.