Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right click Popups in Access 2000 without macros

Status
Not open for further replies.

freewilly

Programmer
Feb 19, 2001
43
0
0
AU
Hi Team

I have right click popups working using macros, but would rather call the code directly. How do I do this. Is there anything like the VB menu Editor?

Thanks

FW
 
No, there's no menu editor equivalent, but you don't need it. You just need to edit the properties of the shortcut menu items.

Shortcut menus are a bit pecular, unlike menu bars and toolbars. To edit them, you first have to make them visible. To do this, first choose View>Toolbars>Customize... from the menu. On the Toolbars tab, set the check mark by Shortcut Menus. A menu bar named Shortcut Menus appears. The last entry on this menu bar is Custom. When you click on this item, a submenu appears. The submenu items are your custom shortcut menus.

Click the shortcut menu you want to modify. The items on that menu appear as a submenu of the shortcut submenu. Right click on an item, and choose Properties. This will give you a dialog named <shortcut menu name> Control Properties. You can change the On Action property to replace the macro with a function call.

According to the help file, you're supposed to code the On Action property with a function call like this:
=FunctionName()
However, Access 97 has a bug that causes this to fail on and off. Microsoft's workaround is to code it as if it were a macro name:
FunctionName
The function name must be a Function (not a Sub) procedure, and must be defined as Public in a standard module.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top