controlling Access 2010 ribbon
-
Montag, 4. Februar 2013 03:42
Hi, I have followed the steps in http://office.microsoft.com/en-nz/access-help/customize-the-ribbon-HA010211415.aspx#BM2. to create to ribbon tabs. At the moment both tabs show the same help button as I'm simply trying to see how it all works.
The first ribbon is named LogonMenu.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="true"> <tabs> <tab idMso="TabLogonMenu" visible="false" /> <tab id="dbFormFunctionsTab" label="Form Functions" visible="true"> <group id="dbFormFunctionsGroup" label="Form Functions Group"> <control idMso="TabFormFunctions" label="Built-in Help" enabled="true"/> </group> </tab> </tabs> </ribbon> </customUI>The second is named FormFunctions
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="true"> <tabs> <tab idMso="TabFormFunctions" visible="false" /> <tab id="dbLogonMenuTab" label="Logon Menu Tab" visible="true"> <group id="dbLogonMenuGroup" label="Main Menu"> <control idMso="LogonMenuTab" label="Built-in Paste" enabled="true"/> </group> </tab> </tabs> </ribbon> </customUI>I have set the application ribbon to FormFunctions. My Logon and main menu forms are set to the LogonMenu.
When I have startFromScratch="true", both tabs are displayed when I want the logonmenu ribbon only to display.
When I have startFromScratch="false", only the FormFunctions ribbon is displayed when I want the LogonMenu to display. I am sure that I am missing something really basic.
Jonathan
Alle Antworten
-
Montag, 4. Februar 2013 08:42
I cannot say this is a bug, but a quirk is if you use the startup ribbon (defined application wide) in a form, things just don't work.
So, copy or create a different ribbon. Don't use applicaiton wide ribbon in any forms. and for using the application wide ribbon, leave the form's ribbon blank.
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada -
Montag, 4. Februar 2013 09:49
Hmmm. that's how I have set this up.
Many thanks
Jonathan
-
Montag, 4. Februar 2013 19:05
Ok, I was just checking to ensure you realize the behavior.
The next problem is I just cut + paste your first ribbon into the ribbon table, and I get errors:
I also get the error for tabFormFucntions .
So, it seems your first problem is your xml is wrong. You should be seeing these errors when you attempt to use that ribbon.
STRONGLY suggest you turn on UI errors during testing, else this is much like throwing darts with a blindfold on – you will never know if you are hitting the target without feed back.
In file->options->client settings
[x] Show add-in user interface errors.
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada- Bearbeitet Albert D. KallalMVP Montag, 4. Februar 2013 19:05
-
Montag, 4. Februar 2013 19:13
Excellent suggestion.
As I had simply used cut and paste from the tutorial to create the xml I was hoping that the structure was good. I'll sort this out. I may even find that this is the cause of the issue.
Jonathan
-
Montag, 4. Februar 2013 21:37
Please examine the xml sample that I posted earlier. Can you tell me whether the xml has changed. It's just that the tutorials that I have so far found are all for Access 2007 and I am using Access 2010.
Jonathan
-
Montag, 4. Februar 2013 21:58
-
Dienstag, 5. Februar 2013 03:20
Yes, the error message I pointed out shows that in office the built in tab called:
TabLogonMenu
Does not exist. It does not exist in 2007, or 2010.
Your XML is thus attempting to use some control that does NOT exist in Access.
The list of LEGAL control names are here:
http://www.microsoft.com/en-us/download/details.aspx?id=6627
(in above, a spreadsheet of allowed isMso is listed for Access).
So your error is due to you using a tab name that does not exist.
Perhaps you want to create your own custom tab as opposed to using a built in one?
So, in summary:
<tab idMso> = <Only built in id mso tab names allowed (from above download list)>
<tab id="any custom name you want>
So, when using idMso, the name you use MUST be an existing built in tab name, not your own custom name. A guess on my part would be that you want your own custom tab name - not a built in one - this means you don't need the visible = false).
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada- Als Antwort vorgeschlagen Yoyo JiangMicrosoft Contingent Staff, Moderator Dienstag, 5. Februar 2013 09:42
- Als Antwort markiert Kiwi Jonathan Montag, 11. Februar 2013 10:03
-
Montag, 11. Februar 2013 10:03thanks for this explaination and your time.
Jonathan

