Answered by:
Custom Ribbon in Access2010

Question
-
I am getting more and more frustrated with the following issue; have studied numerous articles about ribbon customization in MsAccess2010
Finally I tried this easy example (Was just a copy paste)
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<tabs>
<tab idMso="TabCreate" visible="false" />
<tab id="dbCustomTab" label="A Custom Tab" visible="true">
<group id="dbCustomGroup" label="A Custom Group">
<control idMso="Paste" label="Built-in Paste" enabled="true"/>
</group>
<group id="dbCustomGroup2" label="Another Custom Group">
<control idMso="ImportExcel" label="Import from Excel" enabled="true"/>
<control idMso="ExportExcel" label="Export" enabled="true"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>The issue is that the "Import Excel" Button show up on the ribbon, but what ever I do the "ExportExcel" does not. Has anybody an idea whats wrong with that code; I sure its the "obvious" that I dont see.
Thanks Chris
Monday, April 22, 2013 1:01 PM
Answers
-
Hi Gunter, it is the database file; when I create as you suggested, an new small accdb with my ribbon, it works, I see all the buttons in the ribbon, just as expected, looks like I have to create a new database file and transfer the entire content, may be something was corrupted, "Compact&Reppair" did not help. You know of any other tool I could use?
Many thanks,
Chris
- Proposed as answer by Dummy yoyo Thursday, April 25, 2013 7:51 AM
- Marked as answer by Dummy yoyo Monday, May 6, 2013 4:57 AM
Wednesday, April 24, 2013 10:01 AM
All replies
-
Replace 'control' with 'button':
<button idMso="ImportExcel" imageMso="ImportExcel" size="large" enabled="true" label="Import From Excel"/>
Same with the Export line.
- Edited by Lawrence Ellefson Monday, April 22, 2013 1:22 PM
Monday, April 22, 2013 1:21 PM -
Thanks Lawrence, but the effect is exactly the same; the Import Button is display, but the export is not even displayed; I have just copy/paste your code and inserted a second one with the idMso="ExportExcel". I also does not show any errors as I have activated the Show errors on Custome UI in the database.
Any other ideas?
Chris
Monday, April 22, 2013 1:48 PM -
Chris
This seems to work for me.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <ribbon startFromScratch="true"> <tabs> <tab idMso="TabCreate" visible="false" /> <tab id="dbCustomTab" label="A Custom Tab" visible="true"> <group id="dbCustomGroup" label="A Custom Group"> <button idMso="Paste" label="Built-in Paste" enabled="true"/> </group> <group id="dbCustomGroup2" label="Another Custom Group"> <button idMso="ImportExcel" label="Import from Excel" enabled="true"/> <button idMso="ExportExcel" label="Export" enabled="true"/> </group> </tab> </tabs> </ribbon> </customUI>
I changed this line:
<ribbon startFromScratch="true">
And these:
<button idMso="ImportExcel" label="Import from Excel" enabled="true"/>
<button idMso="ExportExcel" label="Export" enabled="true"/>
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsMonday, April 22, 2013 2:24 PM -
Hi Bill, thanks for you reply,
I have copy/paste your code, and you would not believe; the effect is the same, the "Import from Excel" button works, however the "Export" Button does not appear; I suspect that this could be a language problem as I run the OS+Office in german language, maybe MS made an error when translating the "ExportExcel" tag?
What do you think?
Chris
Monday, April 22, 2013 2:47 PM -
Hi Bill, thanks for you reply,
I have copy/paste your code, and you would not believe; the effect is the same, the "Import from Excel" button works, however the "Export" Button does not appear; I suspect that this could be a language problem as I run the OS+Office in german language, maybe MS made an error when translating the "ExportExcel" tag?
What do you think?
Chris
That is strange, Chris. I just tested again and the excel export works for me. I haven't heard of code being dependent on the OS language. Is your Excel the same version as your Access? If it is not, that might be the source of the problem.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsMonday, April 22, 2013 3:01 PM -
Hello ctk_at,
ctk_at wrote:
I have copy/paste your code, and you would not believe; the effect is the same, the "Import from Excel" button works, however the "Export" Button does not appear; I suspect that this could be a language problem as I run the OS+Office in german language, maybe MS made an error when translating the "ExportExcel" tag?
The Ribbon XML works also in a German Access.
Select a Table or Query to enable the Export Ribbon Button.HTH
Gunter
Access FAQ: http://www.donkarl.com
http://www.avenius.com - http://www.AccessRibbon.com
http://www.ribboncreator.com - http://www.ribboncreator2010.com
http://www.ribboncreator2013.com- Proposed as answer by Bill Mosca, MS MVP 2006-2016 Monday, April 22, 2013 4:48 PM
Monday, April 22, 2013 4:14 PM -
Hello ctk_at,
ctk_at wrote:
I have copy/paste your code, and you would not believe; the effect is the same, the "Import from Excel" button works, however the "Export" Button does not appear; I suspect that this could be a language problem as I run the OS+Office in german language, maybe MS made an error when translating the "ExportExcel" tag?
The Ribbon XML works also in a German Access.
Select a Table or Query to enable the Export Ribbon Button.HTH
Gunter
Access FAQ: http://www.donkarl.com
http://www.avenius.com - http://www.AccessRibbon.com
http://www.ribboncreator.com - http://www.ribboncreator2010.com
http://www.ribboncreator2013.comOh, my gosh! I had a form open so of course the export would work.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsMonday, April 22, 2013 4:48 PM -
Gunter, Bill
Yes my Excel and Access are the same version (Office2010), I have activated the ribbon in Access/Options with table Usysribons; when my app starts a form is display but no table/query is selected.
I also changed the ribbon property of the form, but no change. "A Custom Tab" gets displayed, when clicking, the "Built in Paste" tab and the "Import from Excel" gets displayed, but not export. And this is the same when I select a table or query. This drives me crazy.
Chris
Monday, April 22, 2013 7:43 PM -
Gunter, I have studied your site (GREAT!), and done step by step the instructions given their; so I think there is not much I can do wrong in that simple example I tried to do. But something must be wrong; I will try in an other installation to see if this has something to do with my computer or is a more general issue within our company.
Thanks,
Chris
Monday, April 22, 2013 7:49 PM -
Chris
The Excel button will not be activated unless you have something open that can be exported. The form I had open had a table as its RecordSource. Does your startup form have a RecordSource?
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsMonday, April 22, 2013 8:50 PM -
Chris,
How is it going with the problem? Is it work on other computer?
Is it that both the button and the label for "Export" don't show up?
Yoyo Jiang[MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Tuesday, April 23, 2013 5:26 AM -
Bill, I understand the point, re your question, no the form does not have recordsource as it is mainly used to navigate between the functions of the app, however when I go to the navigation pane (left hand window) and open a table (I can see it in the main window!) then still the export button on the ribbon is simply not there, its not that it is just deactivated, it does not even get displayed.
Chris
Tuesday, April 23, 2013 5:33 AM -
Hi, I will try on other computer this morning, and yes its both the button and the label for export is not displayed, no matter if I have an table or query open or not.
Chris
Tuesday, April 23, 2013 5:34 AM -
I have tried on an other computer, with exactly the same database file and the effect is the same, Import tab is displayed and can be activated, export simply does not appear, no matter if a table is active or not. Its just not there.
Chris
Tuesday, April 23, 2013 8:39 AM -
Hi Chris,
Very strange, the ribbon file you provided works fine on my computer with Access 2010 installed.
Just a thought, would you please try to copy the ribbon file to notepad and then paste it onto the USysribbons table? I'm thinking of formatting problem in the xml.
Also, replace the idmso control with a normal button. We can set the button with image as imageMso="HappyFace" to see if it works.
Try the idMso export button to other group and see if it works.
Yoyo Jiang[MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Tuesday, April 23, 2013 9:01 AM -
Hi Yoyo,
did what you suggested copied Memo Field content of Usysribbon to notepad and back -> no change
Not sure fully understand what you mean with "normal button". this is my new xml.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<tabs>
<tab idMso="TabCreate" visible="false" />
<tab id="dbCustomTab" label="A Custom Tab" visible="true">
<group id="dbCustomGroup" label="A Custom Group">
<button idMso="Paste" label="Built-in Paste" enabled="true"/>
</group>
<group id="dbCustomGroup2" label="Another Custom Group">
<button idMso="ImportExcel" label="Import from Excel" enabled="true"/>
<button idMso="ExportExcel" label="Export" imageMso="HappyFace" enabled="true"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>Tuesday, April 23, 2013 11:26 AM -
Hello,
again, your XML works fine in German Access.
See Sceenshot:
Tuesday, April 23, 2013 12:29 PM -
Hope you can see it; there must some other setting that prevents it from beeing displayed in my case.
Tuesday, April 23, 2013 4:50 PM -
Hello ctk_at,
ctk_at wrote:
Hope you can see it; there must some other setting that prevents it from beeing displayed in my case.
<http://social.msdn.microsoft.com/Forums/getfile/275774>Ok, you use a Web database.
Not all Access controls are available in a Web database like in an
*.accdr.HTH
Gunter
Access FAQ: http://www.donkarl.com
http://www.avenius.com - http://www.AccessRibbon.com
http://www.ribboncreator.com - http://www.ribboncreator2010.com
http://www.ribboncreator2013.comTuesday, April 23, 2013 5:31 PM -
Hi Chris,
I mean custom button instead of built-in button, when I said "normal button". I should have said it more clearly.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <ribbon startFromScratch="true"> <tabs> <tab idMso="TabCreate" visible="false" /> <tab id="dbCustomTab" label="A Custom Tab" visible="true"> <group id="dbCustomGroup" label="A Custom Group"> <control idMso="Paste" label="Built-in Paste" enabled="true"/> </group> <group id="dbCustomGroup2" label="Another Custom Group"> <control idMso="ImportExcel" label="Import from Excel" enabled="true"/> <button idMso="ExportExcel" label="Export" enabled="true"/> <button id="TestButton" imageMso="SadFace" label="Test Button" enabled="true"/> </group> </tab> </tabs> </ribbon> </customUI>
I tried this xml in the web Access 2010, and it works as expected. The buttons are showing up.
I've uploaded a demo database for your reference.
Hope it helps.
Yoyo Jiang[MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Wednesday, April 24, 2013 4:50 AM -
Hi Yoyo,
hmm "SadFace" appears, againg copy/paste your code, can I attach ExeclExport to a custom button like "SadFace".
Thanks again,
Chris
Wednesday, April 24, 2013 6:56 AM -
Gunter, my ending is ACCDB, why do you think it is a web database? The db is published on an internal share but not on the web or intranet.
Thanks,
Chris
Wednesday, April 24, 2013 9:01 AM -
Hello ctk_at,
ctk_at wrote:
Gunter, my ending is ACCDB, why do you think it is a web database? The db is published on an internal share but not on the web or intranet.
Shows the "Export" Ribbon Button if you select the table
"budget_entry" ?Can you create a smal accdb with one table "test" with 1 or two
records and your ribbon?Works this?
HTH
Gunter
Access FAQ: http://www.donkarl.com
http://www.avenius.com - http://www.AccessRibbon.com
http://www.ribboncreator.com - http://www.ribboncreator2010.com
http://www.ribboncreator2013.comWednesday, April 24, 2013 9:37 AM -
Hi Gunter, it is the database file; when I create as you suggested, an new small accdb with my ribbon, it works, I see all the buttons in the ribbon, just as expected, looks like I have to create a new database file and transfer the entire content, may be something was corrupted, "Compact&Reppair" did not help. You know of any other tool I could use?
Many thanks,
Chris
- Proposed as answer by Dummy yoyo Thursday, April 25, 2013 7:51 AM
- Marked as answer by Dummy yoyo Monday, May 6, 2013 4:57 AM
Wednesday, April 24, 2013 10:01 AM -
Hello ctk_at,
ctk_at wrote:
it is the database file; when I create as you suggested, an new small accdb with my ribbon, it works, I see all the buttons in the ribbon, just as expected, looks like I have to create a new database file and transfer the entire content, may be something was corrupted, "Compact&Reppair" did not help. You know of any other tool I could use?
try /decompile
http://www.donkarl.com?FAQ1.23HTH
Gunter
Access FAQ: http://www.donkarl.com
http://www.avenius.com - http://www.AccessRibbon.com
http://www.ribboncreator.com - http://www.ribboncreator2010.com
http://www.ribboncreator2013.comWednesday, April 24, 2013 10:27 AM -
Hi, Gunter,
/decompile did not fix the problem, anyway, thanks a lot for your help and advice, appreciate very much.
Chris
Wednesday, April 24, 2013 3:05 PM -
The reason for mentioning a Web database vs. desktop is in your post date/time stamp; Tuesday, April 23, 2013 4:50 PM, the display is what you would expect in a Web design database. The Globes in your Nav Pane give it away. If you look at the other posts having a graphic of the Nav Pane it looks like a desktop database. If Gunter is correct about some features not available in Web based design then this may be one of them. The new small database you created as a test was most likely desktop type App vs. Web and since it worked and the other did not, that lends to Gunter reasoning.
If this reasoning is correct then there is no corruption, just a feature not supported in Web Design. You may have come accross a situation where the db is in Web design and it needs to be in desktop design. I do not know of a way to convert this from one to another. If this is your case then you may be faced with rebuilding from scratch to make it desktop?
Chris Ward
Thursday, April 25, 2013 2:39 PM -
Sorry was away for a few days:
To recap. My Database is not web; the globes that do appear in the nav pane indicate odbc connections to an sql server database.
Thanks,
Chris
Monday, May 13, 2013 6:26 AM -
May be a quick followup: I created a completly new database file and imported the content of the previous one;
created the ribbon as I wanted so far so good.
When I run the app in "normal" mode the ribbon gets displayed (which actually is better than before were I did not get it at all) but starting access with the /runtime the Export Excel Button disappears again.
Would be greate if somebody could recreate this behaviour.
Chris
Tuesday, June 25, 2013 2:09 PM -
On Tuesday, April 23, 2013 5:31 PM, Gunther commented that /Runtime will not support all features. Perhaps this is the case here.
Chris Ward
Tuesday, June 25, 2013 3:46 PM -
Seems to be the case,
Thanks.
Christian
Wednesday, June 26, 2013 4:38 PM