Lost Toolbar & Menubar

  • Thread starter Thread starter alena
  • Start date Start date
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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top