Auto hide the ribbon & menu bars on load (2 Viewers)

SOS

Registered Lunatic
Local time
Today, 11:55
Joined
Aug 27, 2008
Messages
3,517
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.
 

jonno_g

Registered User.
Local time
Tomorrow, 04:55
Joined
May 30, 2007
Messages
52
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.
 

abbers_01

Registered User.
Local time
Today, 13:55
Joined
Aug 31, 2007
Messages
45
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
 

jonno_g

Registered User.
Local time
Tomorrow, 04:55
Joined
May 30, 2007
Messages
52
So it's not viable for you to force the DB to run as runtime?

If not, why not?
 

boblarson

Smeghead
Local time
Today, 11:55
Joined
Jan 12, 2001
Messages
32,059
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.
 

abbers_01

Registered User.
Local time
Today, 13:55
Joined
Aug 31, 2007
Messages
45
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.
 

Newbie2001

New member
Local time
Today, 11:55
Joined
Dec 6, 2011
Messages
6
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 !!
 

AccessGuy42

New member
Local time
Today, 11:55
Joined
Sep 12, 2012
Messages
1
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
 

abzalali

Registered User.
Local time
Tomorrow, 01:55
Joined
Dec 12, 2012
Messages
118
where to write the code? that means which event or which form?
 

Evon

Registered User.
Local time
Today, 19:55
Joined
Apr 1, 2003
Messages
83
Thanks datAdraline, just did a search on the topic and that code helped me.
 

Users who are viewing this thread

Top Bottom