Different Menus For Different Forms

  • Thread starter Thread starter Susan via AccessMonster.com
  • Start date Start date
S

Susan via AccessMonster.com

I've seen some good info on this site on creating menus. Right now I have
buttons on my form that I would like a custom menu to perform which will give
me more room on my form.

I'm able to create the custom menus using "Public" modules just fine. But the
menus are present "all the time". But I only want the custom menus to be
present when the form is active/open.

How can I connect the custom menus to the each form, and at run time the
custom menus for that form is present. Can anyone help me with this??


Thanks,
Susan
 
I don't think you can. The menus remain the custom menus for the application.
 
Ok. I figured it out. I needed to show the menu in the menu bar of the form
and deactivate it from the start up. It works fine now.
I don't think you can. The menus remain the custom menus for the application.
I've seen some good info on this site on creating menus. Right now I have
buttons on my form that I would like a custom menu to perform which will give
[quoted text clipped - 9 lines]
Thanks,
Susan
 
Hi Susan

A form has a "MenuBar" property. If you set that to a custom menubar then
your menu will show instead of the default one when that form is open.
 
You simply specify the menu in the forms other tab.

Try downloading the 3rd sample here. Notice how the menu options CHANGE FOR
EACH form.

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm
(grab the "hidden interface example")

The beauty of the above is NO code is needed to do this. You REALLY want to
set the menu in the forms "other" tab, since if you got two forms open, and
a user switches between each form, then the correct menu will show for you.
Try to do this in code is a futile attempted..and not really workable.

Give the above a try....open a new form...check all of the menus...close the
form...check all of the menus options. After you play, take a look at the
settings used, and you can see that NO CODE is needed, nor required to
accomplish this.
 
Back
Top