Windows 7 - [Access 2007] How to edit custom menubar created in Access2003?

Asked By Remi Pi on 14-Dec-09 03:45 AM

This is my first post to this server, Hello everyone.

We're working on a database created by my collegue in MS Access 2003. Since
some time we have moved to MS Access 2007. Now we find problems editing the
menubar. Each time we want to remove/add/alter a menu item my collegue goes
to his MS Access 2003 and changes a menu.
In 2007 the full menubar is visible under Add-Ins ribbon menu.

Normally there ishould be a system table USysRibbon, but it is not there.
There are only MSys* objects. How can we change the menubar directly in MS
Access 2007? Is that possible at all?

Best regards,

Albert D. Kallal replied to Remi Pi on 14-Dec-09 10:41 AM
the USysRibbon is ONLY for custom ribbons. You have to use code to
modify/create menu bars.

So, the choices you have for modifying menu bars in 2007 are quite limited.
I suggest you either;

a) use 2003 to change the menus
b) use VBA code to modify the menus
c) replace the menus with ribbons

The above choices are not ideal. However, there is no user graphical
interface in 2007 that lets you edit menus graphically.

You can continue to use menus however. In fact, you can even hide the
ribbon, and display menu bars the same way they look in previous versions.

Here is some code examples in modifying the menu bars:

Note that for access 2010, there is a built in ribbon customizer that allows
you to modify and add buttons/groups to ribbons. However, this ribbon
customizer is for ribbons, not menu bars..

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
Remi Pi replied to Albert D. Kallal on 14-Dec-09 11:23 AM
Dnia Mon, 14 Dec 2009 08:41:30 -0700, Albert D. Kallal napisa?(a):

Thank You very much for the comprehensive answer.

We indeed have hidden ribbon and display menus only, when the user logs in
standard way (witho no SHIFT key pressed). When we log in with the SHIFT
key pressed, it gives us a nice admin interface to the database (which is
actually an user interface to real MS SQL database).
I am not sure is that fine to use only the ribbons, since few of our users
still uses Office 2003. Won't it be a problem for 2003 users if we replace
menus to ribbons?

On Your link I found examples how to create new ribbons - that is useful,
thanks. But is there any way to get VBA code for current menus? Maybe from
2003 version, so we can easly copy/paste this code into 2007 version.

Thanks in advance,
Albert D. Kallal replied to Remi Pi on 14-Dec-09 12:05 PM
The above is correct. If you have a mix of 2003, and 2007 users, then you
have to stick to using menus.

Just like a form in design mode, there is no code for that form (just a
bunch of numbers that hold the position of a text box on the screen...code
reads that information and displays the text, there not code, but
only saving values that represent the form.

The same occurs for the menus. There is not code, but only entries in a
object that has those menu bars...

It is possible that the original developer did use code to create the custom
menu bars, but you would be easily able to see that code in the application
now. So,  the developer might be using code now, but you would easily see
that code in the VBA code editor for a form or in the application startup
code that runs. So, I would just check/look at the startup code that runs
when the application starts up..if there is no menu bar code, then the
developers used the "customize" menus option and did not write code. Both
approaches were common, but if no code was used to create the menu bars,
then again for 2007 you not be able to use/modify that code because no code
was used.

So, to modify existing menu bars, or add, or remove have to
resort back to using VBA code to make those changes. So, there is no
modify that particular object in question.

For 2007, to modify menu bars you have no other choice but to write code....

For example, you can write some VBA code to open a form up in design mode,
and add or remove a text box, however it is far more easy to use the form's
design tools and make the changes with the mouse in form's design mode.

In 2007, the menu bar design tools do not exist anymore, so you have to write
code to make changes to menu bars.

Since you supporting both 2007, and 2003, you really have to stick to the
lowest common system for development. There is tons of features in 2007 that
2003 does not have yet. (the ribbon is only one of many features new to

I think the best solution here would be to do all development in 2003 since
that is the lowest common system that you can expect users to have.

While going forward is easy for for most software systems, going back is

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
Remi Pi replied to Albert D. Kallal on 15-Dec-09 02:19 AM
Dnia Mon, 14 Dec 2009 10:05:45 -0700, Albert D. Kallal napisa?(a):

Thank You for Your answers, we are probably going to switch to Access 2007
completely and convert menus to ribbons.
Best regards,
Remi Pi