Removal of menu bar in access 2007 with module coding

S

slc

In access 2003 I have a module call "barremove" with the following
code:

Function RemoveBar()
Application.CommandBars("menu bar").Enabled = False
Application.CommandBars("form view").Enabled = False
End Function

It removes the menu bars from my forms when a form is opened in my
access 2003 databases.
The problem is that when I open my databases in access 2007, it does
not remove the "Menu Bar" from my forms when the module is call.
Does any one know what the code is that will remove the menu bar from
my forms in access 2007?
 
S

slc

Application.CommandBars("menu bar").Visible = False

HTH

Pieter








- Show quoted text -

Thanks for the help, but that did not work. when I run or call the
code it give me a debug box and won't me to debug the code.
 
Top