Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminating toolbars

Status
Not open for further replies.

BSman

Programmer
Apr 16, 2002
718
US
I'm running into a problem with toolbars taking up too much space on users' screens when they are in a lower resolution (800x600), but I can't find a way to stop the toolbars from showing. Is there some code I could put behind a form or something else I could do that would suppress the display of any toolbars? The toolbars really shouldn't show unless I'm doing design work anyway.

By the way, if I try to right click on the toolbars (or even a control on a form, for that matter), the normal options menu is not displayed...nothing is displayed.

Currently I'm using the .adp file. Do I need to go to the .ade file for users to eliminate this problem?

Bob
 
This is how I've done it: This runs on opening the initial form for the project.

Code:
Public Sub HideAllToolbars()
Dim I As Integer

For I = 1 To CommandBars.Count
If CommandBars(I).Name <> "PMMonthlyRep" Then CommandBars(I).Enabled = False
Next I

End Sub

I have a custom toolbar PMMotnhlyRep which includes the items I want to make available to them.

Remembering to re-enable toolbars when closing the database:

Code:
Public Sub AllowAllToolbars()

Dim I As Integer

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

DoCmd.ShowToolbar "Print Preview", acToolbarWhereApprop

End Sub
This runs when exiting the system. Other custom toolbars open & close at different points - eg I have a custom toolbar when displaying a report.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top