Toolbars and Menus

Carrie

Registered User.
Local time
Today, 23:10
Joined
Jan 8, 2003
Messages
36
Hi

I've got a database application where I have disabled my menus/toolbars using code from the forum. It works fine. However when anyone else goes into a separate database/new database they find they have also lost all their menus/toolbars in these databases. Is there anyway to get round this?

Any help would be appreciated

Carrie
 
Hi

Thanks for having a look at this for me.

The code I'm using is

Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = False
Next I

and

Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = True
Next I


Carrie
 
I've just tried that but I don't seem to have that problem. Where have you put that code? Is it on your startup form?
 
Hi ya

Yes I have a form where the people have to put in ther password.

On the on open form I've put in the code

Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = False
Next I



I'm also using the code within reports with a customised toolbar. I basically do:

On the on open of my reports I put in
Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = True
Next I

And then specify the toolbar I wish in this case Report Toolbar.


Then on close I put in
Dim I As Integer
For I = 1 To CommandBars.Count
CommandBars(I).Enabled = False
Next I

So that everything is hidden again.


Carrie
 
I still don't seem to be able to reproduce this. Can you post an empty copy of your database and I'll take a look?
 
I have posted that code all over this forum and @ Hide all Access Toolbars and Menubars. You only need to run it once [opening splash form or main menu] to hide all the tool bars and menu bars for that application. Then use the DoCmd.ShowToolbar command for a specific tool bar when needed. I have never had a problem with all of my tool bars or menu bars disappearing for all of my other databases. That code is application specific.
 
Last edited:
Stephen81 and Gudson

Thanks for your replies and help.

From what you say Ghudson I think I have overused the code you posted by putting it everywhere and I think this has caused the problem! Time to remove the code from all my reports I think!!!!

Thanks for the help

Carrie
 

Users who are viewing this thread

Back
Top Bottom