UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> disabling menus and toolbars??    
 
   
MaxJam
post Feb 9 2004, 10:42 AM
Post#1



Posts: 115
Joined: 17-November 03
From: Ireland


How do you disable toolbars and menus for users?
know how to disable the min max buttons, but what about the menus u regularly use while developing in access?? how do u hide them at run time, my users keep clicking on the save button thinking theyre saving records, but all they save is the state of the application which is causing me havok!!!
Also is it a good idea to implement Close buttons, would these simply involve an Exit Form event or what???
Go to the top of the page
 
R. Hicks
post Feb 9 2004, 01:01 PM
Post#2


UA Forum Administrator
Posts: 40,505
Joined: 8-February 00
From: Birmingham, Alabama USA


Use the DoCmd.ShowToolbar method to remove the Toolbars and Menus you want ...
Here are a few examples:
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "UtilityToolbar", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Form View", acToolbarNo
To show the Toolbars/Menus again .. change "acToolbarNo" to "acToolbarYes" in the examples above.
RDH
Go to the top of the page
 
MaxJam
post Feb 10 2004, 03:43 AM
Post#3



Posts: 115
Joined: 17-November 03
From: Ireland


Thats brilliant, thanks, listen, one thing, how do i find out the "string" names for all the toolbars???
Is it just the actual individual menu names as appears in VIEW-TOOLBARS ???
Go to the top of the page
 
R. Hicks
post Feb 10 2004, 09:49 AM
Post#4


UA Forum Administrator
Posts: 40,505
Joined: 8-February 00
From: Birmingham, Alabama USA


Here is an example that will print "all" of the menu and commandbar names to the debug window ...
CODE
Dim i As Integer
On Error Resume Next

For i = 1 To CommandBars.Count - 1
  Debug.Print CommandBars(i).Name
Next

RDH
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    20th September 2019 - 01:19 PM