none
as a desktop app, cannot make ribbon go away RRS feed

  • Question

  • For ms access apps I have two ways to make them function as desktop apps. One way is to shrink the ms access parent window to fit the form. The other way is to hide the ms access parent window and make the form a pop up window. The problem with hiding the parent window is, if an error occurs, there's no way to see the message and the app becomes locked up. I'm remembering from several years ago. So I need the ribbon to go away so the parent window will shrink properly. Apps made with previous versions of access work fine, except there is the extra ribbon line present which I don't want to be visible or people to click on. Also, if the ribbon expands, it messes up the application.

    The technique // DoCmd.ShowToolbar "Ribbon", acToolbarNo // will make the ribbon go away, unless start up is used. When start up is used, an abbreviated ribbon is produced instead. I read about creating the USysRibbons table, putting ribbon info there, and making that the start up ribbon. But it still gives me an abbreviated ribbon. A new ribbon can also be made with code and set as the start up ribbon which works no better.

    I experimented resizing the window containing the ribbon. This can be done by finding the child window from the main ms access window. Unfortunately when the main window is resized by the user, everything is recomputed and it comes back. I would have to put code on the resize event to always fix it, and then Microsoft may change the window class names or other info in future and my code would no longer find them. That's the worst way to make an app. anyway.

    I would like to know if anyone has had better success getting rid of the ribbon completely if start up is used. Also I want to know how to make a complaint or request to Microsoft to allow this.

    Monday, March 4, 2019 4:11 PM

Answers

  • Hi. I have Access 2016 MSI. I use the command to hide the Ribbon in the Autoexec macro.
    • Marked as answer by dmcdivitt Monday, March 4, 2019 9:38 PM
    Monday, March 4, 2019 7:36 PM

All replies

  • Hi. What exactly do you mean by "unless start up is used?" What are you referring to as "start up?"
    Monday, March 4, 2019 4:54 PM
  • Hi. What exactly do you mean by "unless start up is used?" What are you referring to as "start up?"
    By start up I mean designating a form to run automatically when the file is opened or having an autoexec macro.
    Monday, March 4, 2019 4:57 PM
  • Hi. What exactly do you mean by "unless start up is used?" What are you referring to as "start up?"

    By start up I mean designating a form to run automatically when the file is opened or having an autoexec macro.

    Okay, thanks for the clarification. So, how does that prevent the use of ShowToolbar? I use ShowToolbar acToolbarNo with a startup form and don't see the ribbon at all.
    Monday, March 4, 2019 5:56 PM
  • When you make the ribbon disappear, is that on the access frame or on the form you are displaying. Also, what version of access do you have? I have 2016 with Office 365 Pro Plus.
    • Marked as answer by dmcdivitt Monday, March 4, 2019 9:38 PM
    • Unmarked as answer by dmcdivitt Monday, March 4, 2019 9:38 PM
    Monday, March 4, 2019 6:05 PM
  • Hi. I have Access 2016 MSI. I use the command to hide the Ribbon in the Autoexec macro.
    • Marked as answer by dmcdivitt Monday, March 4, 2019 9:38 PM
    Monday, March 4, 2019 7:36 PM
  • Thanks for this info. I never use an autoexec macro. I hate them. I always have a form called "init". My deployment utility compiles an mde/accde, then attaches startup properties such as not showing the database window, and set init as the start up form. This is nice because I don't have to hold the shift key down which is a pain, and I can use an ms access environment just like any other software development environment.

    So I did try the autoexec macro and that works. I didn't put the code there, but told it to open the init form. This is good.

    I will need to change my deployment utility to write an autoexec macro instead of attaching a start up form. I don't know why there is a difference in functionality, but I'll surely go with what works. I am a bit happier today.

    Monday, March 4, 2019 9:38 PM
  • Hi. Glad to hear you got it to work on your end as well. Good luck with your project.
    Monday, March 4, 2019 9:44 PM
  • I found my issue. The deployment utility was doing the following:

    db.Properties.Append(db.CreateProperty("AllowBuiltInToolbars",dbBoolean, false))

    Many years ago this was the way to turn off unwanted default toolbars interfering with application design. It seems setting this database value forces an abbreviated ribbon to appear on later versions of ms access.

    There is no difference in functionality using a start up form and using an autoexec macro.

    Tuesday, March 5, 2019 6:26 PM
  • I found my issue. The deployment utility was doing the following:

    db.Properties.Append(db.CreateProperty("AllowBuiltInToolbars",dbBoolean, false))

    Many years ago this was the way to turn off unwanted default toolbars interfering with application design. It seems setting this database value forces an abbreviated ribbon to appear on later versions of ms access.

    There is no difference in functionality using a start up form and using an autoexec macro.

    Thanks for the update! This is good to know. Cheers!
    Tuesday, March 5, 2019 7:33 PM