Custom menus by macros

  • Thread starter Thread starter PeterJC
  • Start date Start date
P

PeterJC

I have an application, with a custom menu, written in Access 2000. I'm using
the application in Access 2007, and I'm converting the custom menu to a
switchboard system (since Access 2007 doesn't support the design mode for
modifying the menu).

I have a switchboard command to print one of 23 reports, and ideally, that
command would open a second switchboard showing all of the reports, from
which I would select one of them, but I am limited to 8 by the switchboard.

I have designed a macro system which provides a custom pop-up menu which
will allow the selection of one of the reports, in accordance with the
Microsoft article "Create custom menus and shortcut menus by using macros". I
have tried to run this macro from the switchboard, either using the
switchboard "Run Macro" command, or using the Docmd method in VBA code, but
neither methoc will cause the macro to run and create the menu.

Please tell me how I can run this macro menu system from the switchboard.
 
Hi Peter,
to use the custom shortcut menu, you set the form's shortcut menu to the
name of the macro.
The Shortcut Menu property for the form is on the property sheet on the
other tab.
Type in the correct name of your macro in the place for shortcut menu. The
list of macros doesn't show up in the dropdown for the shortcut menu, you
need to type it in.

You can instead put the macro in the shortcut menu for a control (such as a
button) on the form.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Jeanette, thanks for your reply. I've tried what you suggest, typing the
'addmenu' macro into the short-cut line of the switchboard's property sheet.
Trouble is, the shortcut then appears when I right-click on any one of the
various levels of switchboard in my system, which is not appropriate for the
menu system I'm trying to build (using the switcyboard as a basis).

What I would like to do is to be able to run the 'addmenu' macro from the
action of clicking on a particular button on the switchboard, giving the
allusion of a 'drop-down menu'. So far, i've not been able to do that.
 
Try this-->
Remove the name of the macro from the shortcut menu for the switchboard.

Put the name of the macro on the shortcut menu for the particular control.
That way the shortcut menu will only appear when that particular control
receives a right click.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Back
Top