Toolbars (1 Viewer)

kbreiss

Registered User.
Joined
Oct 1, 2002
Messages
228
In my AUTOEXEC macro I run the ShowToolbar command. When I open this database it includes the toolbar I selected correctly.

What I'm trying to accomplish is a way to turn off the form view toolbar. I will be having several users using this database and I would like to take away the ability to alter the database design.

Any advice would be appreciated.

Thanks,
Kacy
________
MOTORCYCLE TIRES
 
Last edited:
The follwoing commands will hide the toolbars and open your customized one. You can add any combination opf these to the OnLoad Event of your main switchboard or Form:

DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "YourToolbarNameHere", acToolbarYes

To get the Tool Bars to show again, change the last argument to : acToolbarYes


HTH

Jeff
 
ghudson,
Ok, I looked at that code and I have two questions for you. First, can I put this code in an AUTOEXEC macro so that it will remove the menu bar from every form contained in my database? Secondly, when have the menu bar and toolbars turned off, I saw that you say it also disables the right click function. How do I enable my self to get back in the design view without those options available.

I appreciate your advice,

Kacy
________
Volcano vaporiser review
 
Last edited:
Yes.

Macro/Action/RunCode/ToolbarsOff()

I prefer to run the code from the OnOpen event in my MainMenu form.

Use the ToolbarsOff() & ResetToolbars() functions to hide/unhide the toolbars instead of the code in the EnableDisableAllToolbarsAndMenubars form to use the Right-Click option.

Hold the Shift key when opening the db to bypass the AutoExec macro (and any Startup options)

HTH
 
ghudson,

When I tried to go to Macro/Action/RunCode/ToolbarsOff() and run it is saying Access can't find the function. Any ideas?

Kacy
________
WENDIE 99
 
Last edited:
Are you addding the RunCode command to your AutoExce macro? My post was listing the steps need to do that. I have attached a picture of what the macro should look like (from the surface).

I do not use macros. VBA has the advantage over macros for numerous reasons.

HTH
 

Attachments

  • autoexecmacro.jpg
    autoexecmacro.jpg
    12.3 KB · Views: 253
I am still receiving the error upon opening the database that says, "The expression you entered has a function name that Microsoft Access can't find" I created an AutoExec macro that includes the Action RunCode with the function name ToolbarsOff(). Do I need to declare the function ToolbarsOff() anywhere?

Thanks,

Kacy
________
GANG BANG PUBLIC
 
Last edited:

Users who are viewing this thread

Top Bottom