Auto hide the ribbon & menu bars on load (1 Viewer)

Chai

New member
Local time
Tomorrow, 02:20
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
 

datAdrenaline

AWF VIP
Local time
Today, 18:20
Joined
Jun 23, 2008
Messages
697
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.
 

boblarson

Smeghead
Local time
Today, 16:20
Joined
Jan 12, 2001
Messages
32,059
Welcome to AWF Brent! First Leigh and now you. We just had a huge increase in "expertese!" Very cool!

 

datAdrenaline

AWF VIP
Local time
Today, 18:20
Joined
Jun 23, 2008
Messages
697
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:

Chai

New member
Local time
Tomorrow, 02:20
Joined
Jun 23, 2008
Messages
5
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:

ROMADOZ

Registered User.
Local time
Today, 18:20
Joined
May 14, 2008
Messages
31
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:

datAdrenaline

AWF VIP
Local time
Today, 18:20
Joined
Jun 23, 2008
Messages
697
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.
 

datAdrenaline

AWF VIP
Local time
Today, 18:20
Joined
Jun 23, 2008
Messages
697
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.
 

RuralGuy

AWF VIP
Local time
Today, 17:20
Joined
Jul 2, 2005
Messages
13,826
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.
 

d_rool

Registered User.
Local time
Tomorrow, 10:20
Joined
Jun 10, 2008
Messages
11
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
 

mattkorguk

Registered User.
Local time
Today, 23:20
Joined
Jun 26, 2007
Messages
301
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.
 

datAdrenaline

AWF VIP
Local time
Today, 18:20
Joined
Jun 23, 2008
Messages
697
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.}
 

Yu2008

Registered User.
Local time
Today, 16:20
Joined
May 7, 2008
Messages
44
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
 

Yu2008

Registered User.
Local time
Today, 16:20
Joined
May 7, 2008
Messages
44
Thanks Bob! oh... I see. that would be another big job for me though
:cool: .
 

jjk

Scrub
Local time
Today, 18:20
Joined
Jun 8, 2009
Messages
1
Great thread, thanks for the helpful code!
 

jonno_g

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

jonno_g

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

Top Bottom