By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

Changing Ribbons for different forms

P: 2
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.
Feb 18 '08 #1
Share this Question
Share on Google+
2 Replies


JustJim
Expert 100+
P: 407
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
Mar 3 '08 #2

Megalog
Expert 100+
P: 378
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 startFromScratch="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.

http://msdn2.microsoft.com/en-us/library/aa338202.aspx
Mar 3 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.