Access 2007 Toolbar Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rmurgia
    New Member
    • May 2008
    • 63

    Access 2007 Toolbar Issue

    We have set up a function as listed below to display a custom toolbar used to
    export data from the report. The function is called from the open event of
    each report:

    Function CBShowPrint()
    Application.Com mandBars("Branc hPrint").Enable d = True
    Application.Com mandBars("Branc hPrint").Visibl e = True
    End Function

    We recently converted from Access 2003 to Access 2007. (The custom toolbar was created in Access 2003. There are 3 issues with the conversion:

    1) The user must now click on the menu item Add-Ins to display the toolbar
    2) The Export to Excel no longer functions indicating an incorrect format.
    3) The Export to Word has disappeared

    My questions are as follows:

    1) Can the Add-Ins click be bypassed programmaticall y, so the user sees
    the custom toolbar as soon as the report opens.

    2) It is my understanding that Access 2007 no longer allows the creation of
    custom toolbars. Can the above function be modified to programmaticall y
    display toolbar items which allow extracts to Excel and Word for the Access
    2007 format

    Thanks in advance
  • topher23
    Recognized Expert New Member
    • Oct 2008
    • 234

    #2
    I was just looking at the options for making customizations to the 2007 Ribbon yesterday. The Ribbon uses XML as its source, so what you do in Access is create a table in your database called "USysRibbon s" with ID, RibbonName and RibbonXML fields. Create the XML in the proper format and put it in the RibbonXML field, then load the custom ribbon you want using the RibbonName property in Startup or on any form or report.

    This is the tutorial on it from msdn that I was looking at:


    There isn't a way to make an old 2003 toolbar appear anywhere other than "Add-Ins." If you're going to be using 2007 or newer, you should use the Ribbon.

    The tutorial also explains integrating with other Office applications, which should answer your question about exporting to Word or Excel.

    EDIT: P.S. This tutorial is part one of 3. The first part explains customizing the Ribbon, the second enumerates and describes the attributes and elements of the Ribbon, and the third is a FAQ. The three parts are grouped together in the list box on the left side of the msdn site.
    Last edited by topher23; Nov 6 '09, 03:47 PM. Reason: misspelled some words

    Comment

    • rmurgia
      New Member
      • May 2008
      • 63

      #3
      Thank you. I have already began going through the examples and have successfully created items on the ribbon. (It seems to have a lot more capability than before, however, it used to be simpler and easier with the 2003 toolbars! )

      Comment

      • Megalog
        Recognized Expert Contributor
        • Sep 2007
        • 378

        #4
        Two must have tools when doing your ribbons:

        IDBE Ribbon Creator
        A visual ribbon designer.. you can interface this directly with your database, or create ribbons from scratch and export the code to XML. I usually use this when using a new feature (drop down boxes, complex menus, etc), see how the code gets exported, and then implement that into my database.

        Office 2007 Custom UI Editor
        A simple intellisense validator. Good for when you screw up your code and need to find out exactly what went wrong.

        Comment

        • topher23
          Recognized Expert New Member
          • Oct 2008
          • 234

          #5
          Hey, Megalog, you obviously have experience in this realm. MS has ended corporate support of Office 2003, prompting businesses to "upgrade" to 2007. Since I see this as becoming a common issue as more companies make this transition, why don't you do a How-To on customizing the ribbon, including links to helpful resources like the apps you reference, in the "Insights" area?

          Comment

          • rmurgia
            New Member
            • May 2008
            • 63

            #6
            tofer23, Megalog

            Thanks for the great responses. I have checked the websites you have suggested and keyed in some of the examples to create the various customizations. Do either of you know if these customizations can be used to create something that looks like a toolbar and does with the Access 2007 customizable toolbar does. I set up the Access 2007 customizable toolbar exactly the way I would like it by bringing in the various functions to export data to various applications. I would like this toolbar to display whenever the user clicks on any of the reports I have developed within the application. The problem is that this toolbar is specific to my Access 2007 software and not the application I have developed, which gets deployed to various users. In addition, I could not toggle it off and on depending on when the user clicks a report. Do either of you know if the ribbon can be used to create something resembling this toolbar, which can perform the various data export functions, and then be activated whenever the user clicks on a report. In Access 2003, I set up a function to activate such a toolbar which was triggered from the open event of each report.

            Comment

            • topher23
              Recognized Expert New Member
              • Oct 2008
              • 234

              #7
              Originally posted by topher23
              ...what you do in Access is create a table in your database called "USysRibbon s" with ID, RibbonName and RibbonXML fields. Create the XML in the proper format and put it in the RibbonXML field, then load the custom ribbon you want using the RibbonName property in Startup or on any form or report.
              This is all in the msdn tutorial.

              Comment

              • rmurgia
                New Member
                • May 2008
                • 63

                #8
                Looks like tha's it. I was hoping to imitate the Access 2003 toolbar in that when the user clicks a report, the toolbar appears. It looks like that the user will have to first click the menu item, and then the control items will appear. It should be okay. Thanks for the help.

                Comment

                • topher23
                  Recognized Expert New Member
                  • Oct 2008
                  • 234

                  #9
                  Unfortunately, the Ribbon isn't quite what the old menus and toolbars were, but it is very useful. At the very least, you can turn off the ribbon tabs you don't want so only the custom one appears. That may solve some of your problems.

                  msdn tutorial:
                  The tabs displayed in the Fluent UI are additive. That is, unless you specifically hide the tabs or set the Start from Scratch attribute to True, the tabs displayed by a form or report's UI appear in addition to the existing tabs.
                  So, in your ribbon's XML, set
                  Code:
                  <ribbon StartFromScratch="True">
                  and it will be the only tab on your ribbon.

                  Comment

                  • Megalog
                    Recognized Expert Contributor
                    • Sep 2007
                    • 378

                    #10
                    Originally posted by topher23
                    Hey, Megalog, you obviously have experience in this realm. MS has ended corporate support of Office 2003, prompting businesses to "upgrade" to 2007. Since I see this as becoming a common issue as more companies make this transition, why don't you do a How-To on customizing the ribbon, including links to helpful resources like the apps you reference, in the "Insights" area?
                    I might do that someday, if I get the time. The thing is, I dont like referencing the MSDN tutorials since I think they're badly written. So I would probably have to write up quite a bit of material that actually flows correctly, unlike the tutorials which bounce all over the place and supplies bad code.

                    Comment

                    • rmurgia
                      New Member
                      • May 2008
                      • 63

                      #11
                      topher23, I set StartFromScratc h to True and have come as close to the Access 2003 toolbar as Access 2007 will allow. Thanks again. Megalog, I agree with topher23's idea for writing up some new documentation and would concur with your opinion on some of the existing MSDN documentation.

                      Comment

                      Working...