Flylib.com

Books Software

 
 
 

What s Next?


What's Next ?

In the next chapter, we will look at how you can add custom menus and toolbars to your Access database to replace the rather powerful menus that are bundled with Access. This important phase in the development of your database indicates that you can start to remove the complexity from your application. Though developers are usually very entertained by the prospect of hundreds of features, giving end users more than a few options will serve only to confuse them and increase your training costs. Menus also provide added protection to objects and data in your database. Naturally, as soon as you put a menu in place, the developer and the database administrator are going to want to do something more powerful than your own menus and toolbars can provide. The menu chapter shows you how to get around this as well.



Chapter 7: Protecting Your Database with Menus and Toolbars

Overview

Toolbars and menus allow Access users and developers flexible access to all the built-in menu items and, indirectly, to any objects in your database. Though this flexibility is good for a developer's productivity, it is not necessarily so good when it is available to the users of your database. In my experience, most users are interested in software that makes their job easier. Toolbars and menus bulging with developer options (such as the Design View and Database Window commands) probably do not assist in that aim. In addition, if users are technologically competent, they may be tempted to alter the programming objects of your database. Therefore, it is important that you learn how to use both toolbars and menus to set up a good user interface and to protect your database at the same time.

This chapter teaches you first how to build menus and toolbars. Included are plenty of pictures of all the tricky graphical steps that are required. Once you understand how to build toolbars, you will then learn how to apply those toolbars to your database using either form and report properties or the Access startup options. If you combine these skills, you will have a database that is both simple to use and hard for most users to crack. In addition, because users will not see the developer-specific toolbar and menu commands, there will be little visual incentive for your users to wander about your application. To conclude the discussions, the chapter shows you how you can permanently disable the developer-specific commands on end-users' computers.

The demonstration material for this chapter includes a number of forms and Visual Basic for Applications (VBA) examples:

  • A form to change the default toolbar and shortcut menu for all forms.

  • A form to change the default toolbar and shortcut menu for all reports .

  • A form to disable developer- related commands in the built-in menus.

  • Code to find all the custom menus and toolbars in a database.

  • Code to find all the menu items on a menu.

Note  

To find the demonstration material, open the download database for your version of Access ”for example, grMAP97.mdb ”and select Chapter 7.



Will Menus and Toolbars Help Protect My Database?

Menus, toolbars, and the way that they are applied are important cogs in the overall protection of your Access database. Because different audiences will read this chapter, I provide alternative overviews about the important issues covered in this chapter because people in each of these categories will approach the chapter in a different way.

Overview for the IT Manager

Access menus and toolbars are a good way both to protect your database and to make it simpler to use. Your developer or DBA can produce simple custom menus and toolbars at a low cost by using the top-level forms in your database and a subset of the commands that Microsoft installs as part of the Access setup. These custom menus can then be combined with the database startup options to form a reasonable level of protection. Near the end of the chapter, I explain how you can permanently disable some of the developer menu and toolbar commands on an end user 's computer.

Overview for the DBA

Creating Access toolbars and menus is not a difficult skill to master, and you can use them to provide a consistent and easy interface for your database users. DBAs should first become familiar with the basics of toolbar design because you can use custom toolbars and menus across all your databases. Once these skills are mastered, DBAs should review in detail the effect of the five toolbar-specific Access startup options. Finally, DBAs should discuss with management whether disabling Access menu options permanently is appropriate for some of your Access users.

Overview for the Developer

Getting started with toolbars and menus in an Access database is all about understanding the little tricks. That mastered, the next skill is knowing how to plug the protection holes that the built-in menus and toolbars provide for users. Once you have those basics mastered, further toolbar development is a balancing act between good interface design and the power that toolbars can bring to your application. This chapter will show you how to set up toolbars, menus, and shortcut menus. The download software will ensure that your entire application is using your menus and toolbars, and the discussions on startup options will show you how and why these options are important for your database protection. In addition, you may want to discuss with your manager or clients whether it is appropriate to disable menu items permanently on your end users' computers. Finally, some additional samples in the download database show you how to program the CommandBar object to manipulate the toolbars.