By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,395 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,395 IT Pros & Developers. It's quick & easy.

Switch off / Hide Toolbars & Menu Bar from Application using VBA

P: n/a
When my application starts 2 toolbars still remain open

1) Form View and
2) Formatting (Form/Report) Toolbar

Also ... Access's default Menu-Bar also remains open.

How to switch it off at the beginning of my application using VBA and
then switch it back on within the exit routine of my application ?
Best Rgds,
Prakash.

Dec 10 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I managed to figure it out (trial & error). Here's my code:

Private Sub Form_Load()
CommandBars.ActiveMenuBar.Enabled = False 'Turn Access' Menu Bar
OFF !!
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo

End Sub
However, if someone has any good start-up & clean-up (while exiting)
routines, could you please post it as I'd like to incorporate it into
my package.
Best Rgds,
Prakash.



pr*************@gmail.com wrote:
When my application starts 2 toolbars still remain open

1) Form View and
2) Formatting (Form/Report) Toolbar

Also ... Access's default Menu-Bar also remains open.

How to switch it off at the beginning of my application using VBA and
then switch it back on within the exit routine of my application ?
Best Rgds,
Prakash.
Dec 10 '06 #2

P: n/a
Thanks for this - strangely enough i've just found a use for it
tonight. However the code doesn't work! I still have the menu bar. Is
it working OK for you?
pr*************@gmail.com wrote:
I managed to figure it out (trial & error). Here's my code:

Private Sub Form_Load()
CommandBars.ActiveMenuBar.Enabled = False 'Turn Access' Menu Bar
OFF !!
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo

End Sub
However, if someone has any good start-up & clean-up (while exiting)
routines, could you please post it as I'd like to incorporate it into
my package.
Best Rgds,
Prakash.



pr*************@gmail.com wrote:
When my application starts 2 toolbars still remain open

1) Form View and
2) Formatting (Form/Report) Toolbar

Also ... Access's default Menu-Bar also remains open.

How to switch it off at the beginning of my application using VBA and
then switch it back on within the exit routine of my application ?
Best Rgds,
Prakash.
Dec 10 '06 #3

P: n/a
Ya, it works like a charm for me. Since you mentioned it doesn't work
for you I went into my App & clicked Tools->StartUp->Allow
Toolbar/Menu Changes, then tried checking/unchecking it. But it works
either way for me.

BTW, at the beginning of my App I also hide the database window with :
CurrentDb.Properties("StartupShowDBWindow") = False

Then I switch off the Menu Bar & Tool Bars.

I'm using Access 2003.

Hope this info helps.

Best Rgds,
Prakash.

keri wrote:
Thanks for this - strangely enough i've just found a use for it
tonight. However the code doesn't work! I still have the menu bar. Is
it working OK for you?
pr*************@gmail.com wrote:
I managed to figure it out (trial & error). Here's my code:

Private Sub Form_Load()
CommandBars.ActiveMenuBar.Enabled = False 'Turn Access' Menu Bar
OFF !!
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo

End Sub
However, if someone has any good start-up & clean-up (while exiting)
routines, could you please post it as I'd like to incorporate it into
my package.
Best Rgds,
Prakash.



pr*************@gmail.com wrote:
When my application starts 2 toolbars still remain open
>
1) Form View and
2) Formatting (Form/Report) Toolbar
>
Also ... Access's default Menu-Bar also remains open.
>
How to switch it off at the beginning of my application using VBA and
then switch it back on within the exit routine of my application ?
>
>
Best Rgds,
Prakash.
Dec 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.