Lost Toolbar & Menubar

A

alena

Using Access 2003, when I dbl click on the Access 2003 icon on the desktop I
am taken into Access but no menu or toolbar is visible.

How can I get these back?

alena
 
N

Nikos Yannacopoulos

Alena,

Once you have opened Access, press Ctrl+G to get to the immediate
window; paste the following line of code in it:

Application.CommandBars("Menu Bar").Enabled = True

and hit Enter. This should make the menu bar re-appear, from which point
you can then select the toolbars you want to be visible.

HTH,
Nikos
 
A

alena

Nikos

Thanks - that did the trick

On investigation found that a form recently opened had on its OnOpen event:

Application.CommandBars("Menu bar").Enabled = 0
DoCmd.ShowToolbar "Menu Bar", acToolbarNo

Am surprised that this code would remain effective after that database was
closed.
Alena
 
N

Nikos Yannacopoulos

Alena,

The menu bar is just another toolbar for Access, so it remembers your
settings just like it does with your choice of toolbars.

Reverse the action in the form's OnClose event.
Note: the Enabled property accepts Boolean values, True or False. Access
stores Boolean values as 0 for False, -1 for True, so the 0 instead of
False works here, but it is better to use True/False in your code for
readability purposes. acToolbarNo is a VBA constant specific to the
ShowToolbar method.

HTH,
Nikos
 
Top