Tool bars / Menu Bars - GONE

teiben

Registered User.
Local time
Today, 20:25
Joined
Jun 20, 2002
Messages
462
Help! I'm not sure how I did this, but NO matter what database I go into i can see any toolbar or menu bar. Yes I tried the shift key. How do I turn it all back on?
When I right click I can get the database startup properties, everything has the check, yet I can't see any toolbars or menu bars. I've searched though the help, and I can't see to find out how to put it back.
 
I already tried that. I'm missing the toolbar now. I was able to right click and get the menu bar back.
 
ghudson is manipulating properties that are persistant. Put his code in a standard module and call it from the immediate window to turn things back on.
 
Which code? There are 6 or so to pick from. Not sure how "put it in a standard module and call it from the immediate window to turn things back on.

Please explain
 
Paste this into the new standard [not a form] module and run it.

Code:
Public Sub UnHide()
 
    Dim i As Integer
    For i = 1 To CommandBars.Count
    CommandBars(i).Enabled = True
    Next i
 
End Sub
Too many people ignore my warning at the top of that posting...

Ensure that you have a way to unhide the menu bars and tool bars before you hide them!
 
Thank you, it worked.
Sorry I must have missed, the part where it says it's global.
Too many people ignore my warning at the top of that posting...
 
How would / could you use that code not globaly, for one database?
 
I thought it worked, but I bailed out of one database and got in another and the toolbars were gone again.
What do you mean by new standard ?

How do I set this for all database? Am I suppose to add these lines of code into every data? Reinstallation is starting to sound good
 
That code should not affect ALL of your databases. It should be specific to only the database that the code is run in.

Have you tried the "restore" tool bar / menu bar" option?

Right click on any tool bar or menu bar, then choose the "Customize..." option, then select all of the tool bars and menu bars and then click the "Reset..." option.
 
I know its a bit late in the day but I had the same problem after useing the code to hide menubars.

I have a link on my master form that will restore my menu bars. When I click this and restore the menus they come back alright.

Then when I close access and reopen it to open another Database (One without this code) the menu bar is gone again.

Right click > Options dose not work as the meun bar option is gone from the list of menus you can enable or disable.

There is something very strange going on with access after running this code and its almost impossible to get it back. Even though I have the code to restore menus.
 
I know its a bit late in the day but I had the same problem after useing the code to hide menubars.

I have a link on my master form that will restore my menu bars. When I click this and restore the menus they come back alright.

Then when I close access and reopen it to open another Database (One without this code) the menu bar is gone again.

Right click > Options dose not work as the meun bar option is gone from the list of menus you can enable or disable.

There is something very strange going on with access after running this code and its almost impossible to get it back. Even though I have the code to restore menus.
 
File Edit View Insert Tools Window Help.....Missing

Not sure what I did but I can't get my Toolbar/Menu bars back :confused:

It's ok on other machines except this one & it also effects all databaes :confused:

Missing Menuebar
TBMISSING.jpg


Working db
TBOK.jpg




I have tried the suggestions mentioned in this thread but still no joy

thinking about resinstalling Office 2003 now :rolleyes:

Any suggestion before I do?

thanks
 
I seem to temporarily get the menu bar back when I put
Code:
Application.CommandBars("Menu Bar").Enabled = True
into load event of a form .

Then by holding down the shift key I then can open the from & reset the menu bar.

This will only last as long as I stay in the design view of the db, I have to repeat the process each time I open it.
& this effects all databases, not just this one.


I desperatly need ot find out why this is happening & find a better solution

I even reinstalled access with the hope of it resetting.


thanks
 
Just a recap on what Ghudson was saying.

Your menu bar should appear, however if you have a problem the next time you load the database follow these steps:

1) Use the unhide code above to temporarily get it back
2) Right click on the menubar, or open the Tools menu from the menubar, and select Customize
3) Goto the 'Options' tab as seen in picture 1 of the zip file i've attached and select the 'Reset menu and toolbar...data'
4) Goto the 'Toolbars' tab as seen in picture 2. Select 'Menu Bar' from the list and then click the Properties button
5) Choose 'Restore Defaults' from the Properies window

This should fix it. But as a reminder, whenever something "screwy" seems to be happening with the database, choose 'Database Utilities' >> 'Compact and Repair Database...' from the Tools menu.
 

Attachments

:confused: Hi all,

I've been experiencing the same problem where the menu and toolbars for any databases on my machine have disappeared. Even if i try to create a new database my menubar does not show up.

Using Ghudson's code I can show the toolbars in the database that I've put the original code.

Does anyone know how to get the toolbars back for every other database that doesn't have the code? Especially when i create a new database...

Thanks
 
Last edited:
Problem Solved

Hi all,

I just tried inserting Ghudson's code to turn back on toolbars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

in the On_Close event of my Main form. This means that when my database is exited all toolbars are restored. Just tested and its working fine. Toolbars are even showing up when I create a new db.

Only thing is if they do not use the main form's exit button the toolbars aren't restored.

does anyone know where i can put this code to be executed on exit of the database totally?

Thanks.
 
Last edited:
I'm going to have to bump this as I am also having trouble with that code

i have this in my form open

Code:
Private Sub Form_Open(Cancel As Integer)

    'hide all toolbars (also disables right click)
    Dim i As Integer
    For i = 1 To CommandBars.Count
    CommandBars(i).Enabled = False
    Next i
    
    DoCmd.ShowToolbar "NWT", acToolbarYes
    
    'hide the menu bar
    DoCmd.ShowToolbar "Menu Bar", acToolbarNo
    
    'hide the database window
    DoCmd.SelectObject acTable, , True
    DoCmd.RunCommand acCmdWindowHide
    
    'hide the "type a question for help" box
    Application.CommandBars.DisableAskAQuestionDropdown = True

    'stop the DB window to open in a seperate tab on the taskbar
    Application.SetOption "ShowWindowsinTaskbar", False
    
End Sub

this works but does NOT show the NWT toolbar

I then have an admin and exit option on the toolbar (which I can't see) that does the oposite of above

Code:
    'Unhide all toolbars
    Dim i As Integer
    For i = 1 To CommandBars.Count
    CommandBars(i).Enabled = True
    Next i

    'Unhide the menu bar
    DoCmd.ShowToolbar "Menu Bar", acToolbarYes

    'Unhide the database window
    DoCmd.SelectObject acTable, , True

    'show the "type a question for help" box
    Application.CommandBars.DisableAskAQuestionDropdown = False

    'allow DB window to open in a seperate tab on the taskbar
    Application.SetOption "ShowWindowsinTaskbar", True

this works except for the toolbars, it shows file edit e.t.c. but nothing else

The reset option when right clicking on the toolbar section also does nothing for me

have I missed something completly?
 
Damn it, I turn one of my databases that uses GHudson's hide code over to another employee this morning and in 15 minutes he is able to get the Menu and toolbars lost. I dislike handing over my babies to hackers. I'm all good but I wich I know how he did it so I could protect the db from him doing it again. Any ideas?
 

Users who are viewing this thread

Back
Top Bottom