Changing Ribbons for different forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mike sammer
    New Member
    • Feb 2008
    • 2

    Changing Ribbons for different forms

    Access 2007;OS MS XP. Visual Basic
    How do I change the Ribbon when I close 1form and open another?

    Have started trying to use the Ribbon; have customized the Ribbon to a limited extent.

    I read that I could simply select a different Ribbon, ie Ribbon2 in the Form's properties "Other" tab on Ribbon Name. However, this did not change the from Ribbon1->Ribbon2. I had also emptied the combobox: MS Icon->Access Options->Current Database->Ribbon & Toolbar Options->Ribbon Name.

    Do I have to write some code to deal with this problem?

    Thanks MSammer.
  • JustJim
    Recognized Expert Contributor
    • May 2007
    • 407

    #2
    Originally posted by mike sammer
    Access 2007;OS MS XP. Visual Basic
    How do I change the Ribbon when I close 1form and open another?

    Have started trying to use the Ribbon; have customized the Ribbon to a limited extent.

    I read that I could simply select a different Ribbon, ie Ribbon2 in the Form's properties "Other" tab on Ribbon Name. However, this did not change the from Ribbon1->Ribbon2. I had also emptied the combobox: MS Icon->Access Options->Current Database->Ribbon & Toolbar Options->Ribbon Name.

    Do I have to write some code to deal with this problem?

    Thanks MSammer.
    Hi,
    Good question. I don't have an answer, but I would like to know how it's done also.
    PS we used to have a "subscribe" button that would save me typing all this and getting your hopes up and also taking you out of the "unanswered questions" list, but now we don't... Sorry

    Jim

    Comment

    • Megalog
      Recognized Expert Contributor
      • Sep 2007
      • 378

      #3
      This can be done pretty easily, without any special coding.

      Assuming you have a default ribbon loading up with the database, and you want a specialized ribbon for a certain form or report:

      Make sure your ribbons are stored in the 'USysRibbons' table, and you validate them, either by loading them one by one to verify they work, or by downloading and testing them with the Office 2007 Custom UI Editor tool, available at http://openxmldeveloper.org/articles...mUIeditor.aspx.

      In design view, go to Form Properties > Other > Ribbon Name
      Select the ribbon you want as that form's default.

      Now, this ribbon will open in ADDITION to your default ribbon. If nothing happens, then the ribbon is either exactly the same as the default, or it's invalid. (only takes one bad space or lowercase letter to cause the ribbon to fail sometimes!)
      If you want -only- that new ribbon to show, you'll need to set within the XML of the new ribbon the following:
      <ribbon startFromScratc h="true">

      If you need to get more dynamic than this, I really suggest reading through the three-part walkthrough at MSDN. This covers all of office 2007, but has Access-only examples as well.

      Comment

      Working...