[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Microsoft Access commandbar listing

Asked by BJTurner in Microsoft Access Database, Access Coding/Macros

Tags: Microsoft Access, toolbar, commandbar

I 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(controlname) should have a Controls property, but mine does not.

Any ideas?

Thanks.

Tammy
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Public Sub GetToolbarControl(barname As String, controlname As String)
On Error GoTo ErrorHandler
 
Dim cbarMenu As CommandBar
Dim cbarControl As CommandBarControl
 
Set cbarMenu = CommandBars(barname)
 
For Each cbarControl In cbarMenu.Controls(controlname)
            Debug.Print "     " & cbarControl.Caption
            
Next cbarControl
 
Procedure_Exit:
    'Cleanup
    Exit Sub
 
ErrorHandler:
    Select Case Err.Number
        Case Else
            Call MsgBox("Number: " & Err.Number & vbCrLf & _
                                 "Description: " & Err.Description & vbCrLf & _
                                 vbOKOnly + vbExclamation + vbDefaultButton1, _
                                 "Unexpected Error")
    End Select
    Resume Procedure_Exit
 
End Sub
[+][-]10/28/09 09:13 AM, ID: 25684854Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Microsoft Access Database, Access Coding/Macros
Tags: Microsoft Access, toolbar, commandbar
Sign Up Now!
Solution Provided By: DatabaseMX
Participating Experts: 2
Solution Grade: A
 
[+][-]10/28/09 08:41 AM, ID: 25684493Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 09:14 AM, ID: 25684869Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 10:26 AM, ID: 25685852Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/09 08:30 PM, ID: 25690464Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/09 08:33 PM, ID: 25690480Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625