Auto hide the ribbon & menu bars on load

I have had good success with this approach. Database retains all functionality while hiding the ribbon and not allowing the user to manually display the nav pane.

Note: It's still possible for a user to turn on the nav pane in an MDE/ACCDE front end. Running as runtime prevents this.

Method to force DB to run as runtime is simple: Create a shortcut (or modify the existing one) and in the "Target:" line add /runtime between the path to your access.exe file and the path to the MDE/ACCDE file.

It would still be possible for a user with just about enough smarts to be dangerous to do damage if they modify the shortcut, remove the '/runtime' and run the database that way, but IMHO that would be a deliberate action to circumvent security measures in most companies would be subject to disciplinary action. (In the one I'm contracted to at the moment it's grounds for instant dismissal!)

HTH,...Jon.
or you can just rename the ACCDE file to ACCDR and it will run as runtime without a special switch. But that works only with Access 2007 ACCDB and ACCDE files.
 
or you can just rename the ACCDE file to ACCDR and it will run as runtime without a special switch. But that works only with Access 2007 ACCDB and ACCDE files.

Brilliant, Thankyou! Even a user that will fiddle with a shortcut is probably going to be a little more wary about changing file extensions.
 
anyone know why this code will only work when I've opened my database while holding the shift key down.

DoCmd.ShowToolbar "Ribbon", acToolbarNo

I need this to work when the user opens the database without holding the shift key down as it will be disabled.

Are there rights that need to be given before disabling the ribbon? Some help with this would be greatly appreaciated.
Thanks,
Abbers
 
So it's not viable for you to force the DB to run as runtime?

If not, why not?
 
anyone know why this code will only work when I've opened my database while holding the shift key down.
Probably because it isn't working at all. If you open a database with the Shift Key, it will give you the Ribbon - no code needed.
 
Actually this runtime solution will likely work for me, I actually didn't know about it, I was just trying to disable everything in Access 2007 to prevent users from changing it, and I had been wondering how I could do exactly what runtime appears to do. Thanks, I'm going to give runtime a try.
 
datAdrenaline ..

I saw your post to hide/display the 'Ribbon' as MS Access starts ...

Hide with: DoCmd.ShowToolbar "Ribbon", acToolbarNo
Dispaly with: DoCmd.ShowToolbar "Ribbon", acToolbarYes

Although I'm only using the first (Hide) option ... I copied the line into my auto-startup form and ZOWIE !!! It worked. Well, sort of ...

If I'm IN MSA2010 ... and I take my startup form from Design View to Form View ... the ribbon disappears and I'm ready for champagne!

However ... when I start the DB with that form (the form to automatically load and run) ... MSA starts ... the form loads and displays .. but the ribbon remains. Is there a step I'm missing?

Any help would be appreciated. Thanks !!
 
in 2010 and later this code also works, and it checks to see if the button to minimize the ribbon is already pressed first so it doesn't maximize the ribbon if it is already minimized:

If Not CommandBars.GetPressedMso("MinimizeRibbon") Then
CommandBars.ExecuteMso "MinimizeRibbon"
End If
 
where to write the code? that means which event or which form?
 
Thanks datAdraline, just did a search on the topic and that code helped me.
 

Users who are viewing this thread

Back
Top Bottom