We also have this:
http://www.lebans.com/comm
mx
Main Topics
Browse All TopicsI am working on a Microsoft Access database that was created in Microsoft Access 2003. The users are now using Access 2007 and we are developing in 2007. However, the custom toolbars the original developer created were created in Access 2003. A couple of the menu items do not work and we need to add items to the commandbar. Going back and forth between developing in Access 2003 and Access 2007 is a pain, so we plan to migrate the toolbars into ribbons. We know how to do it so we are going to do it.
Anyway, opening and recording every button on the ribbons as well as the method/action they execute is a pain. We would like to create a procedure that does it for us. I created the procedure in the code below. It works to a certain extent and then it doesn't. For example, one toolbar has four separate menus: File, Edit, View, and Reports. In each menu there are items. When I run the code below it will return the File, Edit, View, and Reports, but it doesn't list any of the other items under these menus and I can't go any lower on the tree.
According to my search of the web, the cbarMenu.Controls(controln
Any ideas?
Thanks.
Tammy
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
We also have this:
http://www.lebans.com/comm
mx
Okay. I had already found this but you made me look at it again and it works. I still need to figure out how to get the action that goes with it, but it works well. I also need to figure out how to add a level (he stopped at two). The code makes no sense to me. It has variables that I can't figure out where they are declared. I don't understand how it is assigning the values to the columns in the list box, so wish me luck. But it works for what it has.
Thanks.
Tammy
Well, I accepted that before I checked it. I got one more level down than I wanted but I can't get the next level down, which is the last level. This is frustrating.
It was the best solution, so I am not unhappy about accepting it. I just wish I could get to the next level.
Thanks about the ribbon. I have created a ribbon in another app, so I am familiar with how to do so.
Tammy
Okay. I looked at the database and figured it out the best I could. I took what I learned and created a new form that works for me. I thought I would post it for anyone that wants to use it.
I have managed to work this out pretty well. It doesn't work perfectly, but I have it working on the menus I want to look at and I just can't figure out why it fails on the others.
Basically, it is failing on Access created menus and not custom menus. So, the form in the attached file will help you identify information about custom commandbars and will help with identifying the information needed to create a ribbon.
Thought this may help, so I wanted to post it to this thread.
Tammy
Business Accounts
Answer for Membership
by: puppydogbuddyPosted on 2009-10-28 at 08:41:40ID: 25684493
try this code from the tips page of www.aadconsulting.com
List all CommandBars in a Database
Private Sub ListMenuBars()
'Need a reference to Office Object Library
Dim cbar As CommandBar
Dim cbctl As CommandBarControl
For Each cbar In CommandBars
Debug.Print cbar.Name, cbar.NameLocal, cbar.Visible, cbar.Index
Next
End Sub