Creating a Menu Bar

Mile-O

Back once again...
Local time
Today, 23:01
Joined
Dec 10, 2002
Messages
11,305
I'd like to create a menu bar but, even on looking at the help, I'm left clueless as to where to start.

Let's say, for example, I want to create a menu with three options: File, Contents, and Help.

And File has the options: Exit
Contents has the options: Introduction, Input Forms, Reports, and Glossary
Help has the options: Show Help, Bug Report, and About.

How would I do that?
 
i would like to know also
 
Hi Mile-O-Phile / Chewy

In Access 2K you can create your own menu by going to Tools--->Customise. Go to the 'Commands' tab and under categories their should be 'New Menu..'. Just drag this upto the menu bar. By using the right click you can alter the menu bar properties.
To add bits to your new menu, from the categories select whatever you want and drag it up to your new menu. For different drop down menus you have to add a 'New Menu'

HTH
Rob
 
You should be able to do it in '97 as well. Unfortunately I went from '95 to 2000 to XP
 
Cheers, shall investigate further...
 
More Menu BAR Questions

I've been reviewing posts and developing a knowledge base on this subject so I can go ahead with my application. Before asking my question and hoping the answer does not lie within, I found two Microsoft articles on this subject for Access97 that may have good value.
 
More Menu BAR Questions

I've been reviewing posts and developing a knowledge base on this subject so I can go ahead with my application. Before asking my question and hoping the answer does not lie within, I found two Microsoft articles on this subject for Access97 that may have good value.
I am not sure how to post a link in this forum so forgive me if this fails.

ACC97: Command Bar Wizard Available in Download Center
at http://support.microsoft.com/default.aspx?scid=kb;EN-US;172300

And

ACC97: How to Dim Menu Items or Disable Toolbar Buttons in Visual Basic for Applications at http://support.microsoft.com/default.aspx?scid=kb;en-us;160293

I have 2 questions. First, with the Menu Bar I've started, both options created have a right facing arrow like to a further sub-menu that I cannot figure how to get rid of. Any help is appreciated.

Secondly, when viewing a menu item's properties, there is one named Style that stays grayed out. I thought maybe this would get me into a spot where I could remove the arrow above but how do I get into it?

My thanks in advance.
 
I forgot to mention this but several posts on Newsgroups indicated that there is a Menu Builder under Tools/Add Ins.

I could not find it in my copy of Access97 and wondered if the 'Wizard' executable I referred to in my last post is this or if it is hidden in the Value Pack portion of Office97.
 
Sorrells,

I have 2 questions. First, with the Menu Bar I've started, both options created have a right facing arrow like to a further sub-menu that I cannot figure how to get rid of. Any help is appreciated
You should be able to left-click and drag any menu/toolbar item off that you do not want.

Secondly, when viewing a menu item's properties, there is one named Style that stays grayed out. I thought maybe this would get me into a spot where I could remove the arrow above but how do I get into it?
The built-in toolbar/menu bars have some properties that you can not modify.

Do not hesitate to use the "Restore Defaults" or "Reset" options if you muck up a built-in or custom toolbar/menu bar.

HTH
 
gHudson,

I have attached a 1 page zipped Word doc with screen shots of my not so wholesome menu bar.

The menu item Client has 2 sub-menus and that is cool. What is not is the right-arrows beside them that point to a blank sub-sub menu that I do not want and cannot get rid of.

If you would not mind, I'd like to know what the Style property is for also. It remains grayed out in my custom menus.

Restore Defaults is grayed out with the custom menu.

I appreciate your help!
 

Attachments

I am no tool bar expert but this I what I have discovered...

Your problem is cause by the type of menu bar (tool bar) options you are selecting. Instead of adding a "New Menu" item [Categories: New Menu, Commands: New Menu] you should be adding a "Custom" command [Categories: File, Commands: Custom].

I have attached a sample with the custom menu bar named "Sorrells".

HTH
 

Attachments

GHudson,

Your attachment is awesome! But I still am stuck. I got a menu by selecting under the COMMAND tab both ‘File’ as category and ‘Custom’ as the Command. This was fine. I renamed the menu topic “Client”.

But for the life of me, I cannot drag ‘Custom’ to my “Client” menu topic and have it inserted as a sub-topic. It will go to either side but not inside as a submenu.

I suspect I am missing something obvious and will keep at it for a bit longer. Seeing your example makes me KNOW that this is possible!
 
gHudson,

The menu is looking better! Perhaps you could validate the following.

I found that the construction uses both the 'New Menu' and the 'Custom' commands.

1st a New Menu Bar is created. It is of the Menu Bar type.

2nd act requires some thought. If a menu is to be added with a sub-menu, then the "New Menu" is used. If the topic is an end unto itself, then the ‘Custom’ is used.

Ergo “New Menu” always implies that sub-menu items are desired and makes space for them. “Custom” assumes that only a single topic is to be added.

Well one more step forward for this old boy, I can’t wait for the next obstacle…………

As an aside, I spent some 4 hours in forums and newsgroups and never came across the above. I hope this is not simply intuitive as if so, I am in deep trouble!
 
OnAction Event Error of Menu Topic

I thought this would be the next issue. I have created functions in a module fittingly named Menu Module. The VBA code has worked for some time as procedures in forms. I can execute the functions by calling them from the Debug window.

However, after the function name has been added to the OnAction event of the Menu Topic and the menu topic is selected, I am receiving an error - not every time but most of the time as follows:

"The expression you have entered has a field, control or property name that MS Access can not find."

I have noticed that when calling the functions from the Debug window, the Object Browser also comes up for a reason I know not. Is this normal?

The error seems to be a load or compile type as I cannot set a breakpoint to trap it.
 
I didn't see that you ever got an answer to one question you posed...

I forgot to mention this but several posts on Newsgroups indicated that there is a Menu Builder under Tools/Add Ins.

An Add-in is just that, a prgram that has to be downloaded from the MS website, generally installed in the same directory as Access. Then when you select, Tools-Addins it is available.

Autoeng
 
this is in responce to Sorrells question.

I am receiving an error - not every time but most of the time as follows: "The expression you have entered has a field, control or property name that MS Access can not find."

When using a a MenuBar with functions you created. You must have those functions re-called from every form you plan on using the menu bar with. For Example, when the user goes to your custom menu bar and clicks a selection that calls the =Example() function. That function must be listed in the code behind the form that is using the menubar. Otherwise you will recieve the error, "The expression you have entered has a field, control or property name that MS Access can not find." So basically on each form where you use a custom menu bar with custom functions, be sure to also include that function on that form.

Ehh, this makes sense to me. i think?
 
Treason,

Is that still true if you make the function a "Public" function? I have never had this problem before yet all of my funcitons and subs in my db modules (not form/report class modules) are Public.

Public Function Example()

When using a a MenuBar with functions you created. You must have those functions re-called from every form you plan on using the menu bar with. For Example, when the user goes to your custom menu bar and clicks a selection that calls the =Example() function. That function must be listed in the code behind the form that is using the menubar. Otherwise you will recieve the error, "The expression you have entered has a field, control or property name that MS Access can not find." So basically on each form where you use a custom menu bar with custom functions, be sure to also include that function on that form.
 

Users who are viewing this thread

Back
Top Bottom