From: Kevin McCartney on
Hi, I want to create a custom ribbon menu but load it from code when the
database starts (Autoexec), e.g. the ribbon menu is temporary in that I
DON'T/CAN'T use the 'USysRibbons' table (ADP and all that, tables are stored
in Oracle), so after I've connected to the Oracle server and created a
recordset to the menu ribbon table that stores my XML, I then load my menu
ribbons by using the code,

While not rs.EOF
Application.LoadCustomUI rs!MENU_RIBBON_NAME, rs!MENU_RIBBON_XML
rs.movenext

Wend

So the question, what is the code that will hide the current default ribbons
and replace it with the one that I have loaded. In that I don't want to have
to load a Form that has the Ribbon name property setting set to a ribbon that
I have loaded to force my ribbon menu to appear.

All the menu ribbon XML code have the <ribbon startFromScratch="true">

TIA
From: Kevin McCartney on
Well I managed to figure out the answer via a few helpful google searches,
once it has been loaded via code the first time, I can set one of the loaded
ribbons as the default ribbon for the application, via the Office Button |
Access-Options | Current Database | Ribbon and Toolbar Options | Ribbon Name,
and select the ribbon that I want loaded the application is opened next time.
Thus once is has been loaded via the AutoExec marco/function it appears
automatically.


"Kevin McCartney" wrote:

> Hi, I want to create a custom ribbon menu but load it from code when the
> database starts (Autoexec), e.g. the ribbon menu is temporary in that I
> DON'T/CAN'T use the 'USysRibbons' table (ADP and all that, tables are stored
> in Oracle), so after I've connected to the Oracle server and created a
> recordset to the menu ribbon table that stores my XML, I then load my menu
> ribbons by using the code,
>
> While not rs.EOF
> Application.LoadCustomUI rs!MENU_RIBBON_NAME, rs!MENU_RIBBON_XML
> rs.movenext
>
> Wend
>
> So the question, what is the code that will hide the current default ribbons
> and replace it with the one that I have loaded. In that I don't want to have
> to load a Form that has the Ribbon name property setting set to a ribbon that
> I have loaded to force my ribbon menu to appear.
>
> All the menu ribbon XML code have the <ribbon startFromScratch="true">
>
> TIA