+ Reply to Thread
Results 1 to 7 of 7

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

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

    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.


  2. Re: Switch off / Hide Toolbars & Menu Bar from Application using VBA

    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.







    prakashwadhwani@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.



  3. Re: Switch off / Hide Toolbars & Menu Bar from Application using VBA

    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.







    prakashwadhwani@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.



  4. Re: Switch off / Hide Toolbars & Menu Bar from Application using VBA

    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?


    prakashwadhwani@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.
    >
    >
    >
    >
    >
    >
    >
    > prakashwadhwani@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.



  5. Re: Switch off / Hide Toolbars & Menu Bar from Application using VBA

    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?


    prakashwadhwani@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.
    >
    >
    >
    >
    >
    >
    >
    > prakashwadhwani@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.



  6. Re: Switch off / Hide Toolbars & Menu Bar from Application using VBA

    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?
    >
    >
    > prakashwadhwani@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.
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > prakashwadhwani@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.



  7. Re: Switch off / Hide Toolbars & Menu Bar from Application using VBA

    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?
    >
    >
    > prakashwadhwani@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.
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > prakashwadhwani@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.



+ Reply to Thread