How to disable AccessRibbon

Brad White 41 Reputation points
2021-11-17T23:27:17.977+00:00

I've inherited a project that seems to use the ribbon from AccessRibbon.de by @Gunter Avenius
It works fine at runtime.
But at design time, it closes the Navigation panel and removes all the normal development menus.
I can detect design time, but I can't sort out how to stop it from rendering the development environment useless.
I've already removed the ribbon from Access | Options | Current Database | Ribbon Name
and that, interestingly had no effect.
The FAQ says that to load the ribbon manually, you use LoadCustomUI, but I find no reference to that.

On loading a form, I can trace into some routines in basRibbonCallbacks, but that hasn't given me any ideas how to disable it. And there is no source for where it was called from.

I tried setting
Application.SetOption "Show Status Bar", True
CurrentDb.Properties("AllowFullMenus") = True
CurrentDb.Properties("AllowBuiltInToolbars") = True
and so forth, but that had no effect either.

Any other ideas for how to get the toolbar and menus back in design mode?

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
729 questions
{count} votes

Accepted answer
  1. DBG 2,301 Reputation points
    2021-11-18T21:43:47.633+00:00

    Hi. In that case, go to the design view of the form and make sure the Ribbon Name property is empty/blank.


3 additional answers

Sort by: Most helpful
  1. DBG 2,301 Reputation points
    2021-11-22T17:48:09.84+00:00

    Well, I can't see what "form." is referring to. Can you post the entire routine? Does it look similar to this?

    Public Function OpenThisForm(FormName As String) As Variant
        DoCmd.OpenForm FormName
    
    End Function
    

    If so, you could add the following lines to it.

    If DeveloperMode Then
        Forms(FormName).RibbonName = ""
    End If
    

    Hope that helps...


  2. DBG 2,301 Reputation points
    2021-11-18T17:39:22.983+00:00

    To really help you trace the source of the issue, we'll need to see a copy of that db.

    If the ribbon is disappearing, you can try this in the Immediate Window.

    DoCmd.ShowToolbar "Ribbon", acToolbarYes


  3. Brad White 41 Reputation points
    2021-11-21T04:40:29.313+00:00

    @DBG , I can't edit the question, so I'll put this here.

    The form is opened like so....

     DoCmd.OpenForm "frmForm1"  
    

    I want to add code like

      if (DeveloperMode) then  
           form.RibbonName = ""  
      end if  
    

    And all the forms that have ribbons assigned are opened from this one routine that checks for permissions, etc., so I'd like to keep this code in the same routine that opens if, if possible, rather than an LoadForm or OpenForm.

    Any suggestions how best to accomplish that?
    Would you do it before or after opening?

    Thanks!

    No comments