Avatar of Thomas Zucker-Scharff
Thomas Zucker-Scharff
Flag for United States of America asked on

MS Access custom ribbon - can't seem to get it working

I have been trying to create a custom ribbon in MS Access 365 so that when others/users open the frontend of the database they will see a custom ribbon instead of the standard MS Access ribbon.

I created the table and started the XML (not my forte), but almost all the examples use a schema from 2006 (the only one I found that wasn't 2006 was this one which my xml editor complains about <customUI xmlns:x1="http://schemas.microsoft.com/office/2009/07/customui"> - with or without the ":x1") I get the error "no declaration found for element 'customUI' for the schema.

I am also now getting an error everytime I open an email in outlook.  This started happening after I tried to open the access customizations.exportedUI file in the XML editor.

Any help with the problems and created a correct ribbon would be appreciated.
Microsoft OfficeDatabasesMicrosoft Access

Avatar of undefined
Last Comment
Thomas Zucker-Scharff

8/22/2022 - Mon
John Tsioumpris

Check this simple sample for start
If you want something more elaborate you can check my Article where besides the loading of Images i do some custom Ribbon

Thomas Zucker-Scharff

Thanks John!  I'm looking at it now - I didn't realize that your image app had a custom ribbon.
Thomas Zucker-Scharff

What am I doing wrong?  I see your code works fine, but as soon as I paste my code in there (below) I get the error attached.customui error.PNG
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
<ribbon startFromScratch="true">
<button idMso="FileCompactAndRepairDatabase" insertBeforeMso ="FileCloseDatabase" />
<tab id="Home" label="Home" visible="true">
<group id="Group1" label="Group 1">
          <button id="MainMenu" label="Main Menu"
            size="large" supertip="Open the Main Menu"/>
          <button id="Form2" label="Form 2"
            size="large" supertip="Open Form 2"/> 
        <group id="Group2" Label="Group 2">
          <button id="Button3" label="Button 3"
            size="large" supertip="open the Main Menu"/>
          <button id="Button4" label="Button 4"
            size="large" supertip="Open Form 2" />
      <tab id="Maintenance" label="Maintenance" visible="true">
        <group id="GroupM1" label="Group M1">
          <button id="Button21" label="Button 21"
            size="normal" supertip="small button 21"/>
          <button id="Button22" label="Button 22"
            size="normal" supertip="small button 22"/> 
          <button id="Button23" label="Button 23"
            size="normal" supertip="small button 23"/>             
        <group id="GroupM2" Label="Group M2">
          <button id="Button24" label="Button 24"
            size="normal" supertip="small button 24"/>
          <button id="Button25" label="Button 25"
            size="normal" supertip="small button 25"/> 
          <button id="Button26" label="Button 26"
            size="normal" supertip="small button 26"/>
      <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 id="dbCustomGroup2" label="Another Custom Group">
            <control idMso="ImportExcel" label="Import from Excel" enabled="true"/>
            <control idMso="ExportExcel" label="Export to Excel" enabled="true"/>

Open in new window

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Thomas Zucker-Scharff

I customized a ribbon using the customize ribbon tool in MS Access before I realized that I couldn't embed it into the database.  Is there any way to port that to an xml file that access will understand?  I tried importing it into an xml editor and editing it, but that didn't seem to work (of course nothing is quite working right now so maybe it really does work ...).
John Tsioumpris

Activate this to pinpoint errors

Thomas Zucker-Scharff

Yes I did that already. That is why I am getting the error I posted - when I turn that off the error goes away.
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Thomas Zucker-Scharff

Just playing around with it and my code doesn't even produce a ribbon.  I tried getting rid of spacesand matching your code as best I can, but no go :-(

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Thomas Zucker-Scharff

Thanks for the help, now to get it to actually do something ...