Auto hide the ribbon & menu bars on load

Chai

New member
Local time
Today, 08:37
Joined
Jun 23, 2008
Messages
5
Hello,
How can I hide the ribbon and all the other menu and tool bars (including the objects menu bar) automaticaly on the file open (autoexec macro ?)
Or alternatively, how can I make a user file that shows only the forms I have programed and designed and nothing else?

Thank You in advance
Chai
 
In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.
 
Welcome to AWF Brent! First Leigh and now you. We just had a huge increase in "expertese!" Very cool!

2-Thumbs_up.png
 
Hey Bob!!! ...

Thanks for the welcome!! ... I have been meaning to check out "the other side of the tracks" for quite some time (actually lurked around a couple of times), and I was just enjoying my 'bout with insomnia (regular occurance for me!) and thought I'd check it out ...

Kinda cool to see familiar names! ... Now, I have to figure out all the tags to show some emoticon type stuff ...

EDITS ...

>> First Leigh and now you. We just had a huge increase in "expertese!" Very cool! <<

Well ... I gotta keep an eye on Leigh .. he might go spreading rumors about me! ... some folks think we're brothers or the same person using aliases (despite his OBVIOUS accent!) ... so I thought I'd sneak in too!
 
Last edited:
Hide the Navigation Pane

thank you!
do you know how do I hide allso the Navigation Pane ?

(it's not working with the same command onle "Navigation" or "Navigation pane" insted of "Ribbon")


In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.
 
Last edited:
It works when I run my macro manually, but does not work when the macro runs on it's own on open. Help?
 
Last edited:
Hey Chai --

To hide the NavPane ... I use the following procedure:

Code:
Public Function HideNavPane() As Byte
    DoCmd.SelectObject acTable, "MSysObjects", True
    DoCmd.RunCommand acCmdWindowHide
End Function

To unhide the NavPane ...

Code:
Public Sub UnHideNavPane()
    DoCmd.SelectObject acTable, "MSysObjects", True
End Sub

Please note that the same code can be used to Hide/UnHide the database window in A2003 and prior.
 
Hello Romadaz ..

Can you explain a bit more? ... I vaguely remember working with someone that had a similar issue ... I will do some digging and experimenting when I have A2007 available to me.
 
It works when I run my macro manually, but does not work when the macro runs on it's own on open. Help?
I put it in the OnLoad event of the first form I open and it works just fine.
 
I tried the code to hide the navigation pane. But it doesn't work. It closes the whole windows instead??? Any idea why?

Code i used:
DoCmd.SelectObject acTable, "MSysObjects", True
DoCmd.RunCommand acCmdWindowHide
 
If you'd like it off all the time there's an option for that in the Database Properties, just untick the box for 'Full Menus' I think it's called.
 
Hello D_rool,

Do you want to HIDE the NavPane or MINIMIZE the NavPane? .. if you wish to MINIMIZE the NavPane ... you can toggle the NavPane from minimized to restored with the F11 key ... programatically I the following will do the trick ...

DoCmd.SelectObject acTable, , True
DoCmd.Minimize

{Note that you CAN leave the Object Name argument blank in the code I suggested in my earlier post.}
 
Code: hide access ribbon but show refresh button ?

In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.

Hi, I am wondering is there a code that can hide the ribbon but the refresh button?

Thanks,

Yu
 
Thanks Bob! oh... I see. that would be another big job for me though
8-) .
 
Great thread, thanks for the helpful code!
 
It works when I run my macro manually, but does not work when the macro runs on it's own on open. Help?

I appear to have the same problem as you...

If I put the following:

Code:
DoCmd.ShowToolbar "Ribbon", acToolbarNo

into the OnCurrent or OnLoad events for my first form then it works perfectly if I hold shift as I open the DB and then open the form manually, but if I just open it normally then it appears to ignore the above line of code.

I haven't tested it yet, but one possible solution that just came up in a conversation with our IT manager is to force the DB to run as Runtime. Apparently he has just used exactly that solution to launch another DB here, and it's quite successful.

If nobody comes up with another solution then I will likely have to take that route, and I'll try to post back with more information after I've tried it.

Jon.
 
Last edited:
...one possible solution that just came up in a conversation with our IT manager is to force the DB to run as Runtime...

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.
 

Users who are viewing this thread

Back
Top Bottom