'Serving the Microsoft® Access
Community since 1997'

Free Samples
About Us



Custom Toolbar

one way of adding a nice professional looking touch to your Access applications is to use a custom toolbar. I have used mine to give users access to common features like printing and even password changes. At the same time I remove the standard toolbar so they cannot get at menu structures I would rather they could not.

(article continues after sponsor spot)

Creating a custom toolbar is easy.

  1. Click on the View menu
  2. Click on the Toolbars item, Customize item
  3. Click on New and give it a name, then click OK

Notice that Access creates a small, empty, toolbar. Mine was a bit in the way, so I dragged it off to the side a bit.

  1. Click on the Commands tab.
  2. Find each command that you want on your toolbar and drag it on to the toolbar.
  3. When you are done, leave it floating, or drag up to the traditional toolbar area of the screen and have it docked.

One tip. It took me a bit to figure this out. How do you get the little vertical bars that separate groups of buttons? Click on the "Modify Selection" button and click on the "Begin a New Group" item. You will find other things under that button.

Next - How can we make that toolbar appear and disappear while in your program?

For example, many of my clients have systems that have no toolbars showing for some users. Just the buttons on the forms. However, when in a query or in print preview mode, how do you command a Close, other than by using the "x"? By making a custom toolbar and making it show up only when needed.

NOTE: All the VBA code segments on the Database Lessons site assume that you have DAO references active. If you are not sure what this means, and you are using Microsoft Access 2000 or higher, click here.

This code should turn off the normal toolbar.

   Dim oldMBar As Variant
   Set oldMBar = CommandBars.ActiveMenuBar
   oldMBar.Enabled = False

To turn on your custom toolbar:

   DoCmd.ShowToolbar "name of toolbar", acToolbarYes

and to turn it off

   DoCmd.ShowToolbar "name of toolbar", acToolbarNo

Further Suggestions:

To make sure that you find out whenever we are adding more tips, subscribe to our newsletter. Just click the Subscribe button to the left to start the process.

Happy Coding

Note: This web site dedicated to MS Access database users is an independent publication of Richard W. Killey and is not affiliated with, nor has it been authorized, sponsored, or otherwise approved by Microsoft® Corporation.


© 2006, 2007, 2008 Richard W. Killey. All Rights Reserved. - Privacy Policy