By Diane Winger
Access Advisor, November 1997
Copyright © Advisor Publications. All rights reserved.
It was early 1994, and I sat in an audience of Access developers at Microsoft TechEd conference. We had gathered to hear a panel of third-party vendors discuss the OCX components finally available for the newly released Access 2.0. These vendors had been successfully marketing hundreds of controls to Visual Basic developers and were there to tell us when we could expect to see a slew of controls for the Access platform. "We're working closely with Microsoft, and expect to be releasing our most popular OCXs 'soon'," was the general message. Unfortunately, some standards were still being worked out for these specially written 16-bit OCX controls to make them usable by Access.
The flood of professionally written controls for Access 2.0 never really materialized. A few companies offered controls for Access, such as FMS Inc., with their Total Access Components version 2.0 (for Microsoft Access 2.0) released in 1996. Recently, FMS released Total Access Components version 8.0 for Access 95/97, using new-and-improved ActiveX controls. The 2.0 version included 20 custom controls, while version 8.0 contains an additional five controls for Access 95, plus another two controls that work in Access 97 only (for a total of 27 controls for Access 97).
Many of the controls are geared toward improving the appearance of your application. Some of the new styles include borders, a scrolling marquee, enhanced looks for buttons, and special effects for bitmaps. If used in moderation, these controls can add visual interest or focus your application -- but could also be overused to the point of making a form look like a three-ring circus! You can make text spin in circles as FMS demonstrates in their sample database, or simply display text at an angle (rather than always horizontal) to make better use of the space on a form. Hint: only True Type fonts can be displayed at an angle (figure 1).
Two of the visual controls that I find most useful are the Enhanced Button and the Icon Menu controls. The Enhanced Button lets you combine text and an icon on a single button face without having to create a special bitmap or icon using Paint or some other drawing program. It's simple to change only the text, only the bitmap, or change the relative positions of the two on an existing button. It's also easy to have the button show a different caption or picture in its "down" vs. "up" position, and the Enhanced Button can look and behave like either a command button or a toggle button (figure 2).
The Icon Menu control (Access 95/97 only) lets you mimic the look-and-feel of the Outlook 97 toolbar or the toolbar in Internet Explorer, and offers an attractive alternative to the Tab control (figure 1).
Speaking of Tab controls, check out FMS's version. If you're working with Access 97, you may not have much of a need for this component from FMS, since Microsoft has included a tab control with their product. However, for all other versions of Access, or if you need one of the special features of FMS's control, this Tab control is a very clean, easy-to-use version. The manual for Total Access Components offers a clear, honest explanation of when to use their version vs. the Microsoft version of the control, and describes the advantages and disadvantages of each. The FMS control lets you place tabs on the top, bottom, right, or left sides of the control, and automatically rotates text to vertical when tabs are on the left or right (figure 2).
Total Access Components also includes a control to let you display an About Box that closely resembles Microsoft's About Boxes for their products. The Bitmap Effects control can be used to create a flashy splash screen with interesting transitions between bitmaps, reminiscent of slide transitions in PowerPoint.
The Common Dialog control lets you use the File Open, File Save, Color, Printer Setup, and Font common dialogs with little coding -- and the manual provides straightforward examples of how to write the code to use these common dialogs.
Other visual controls include: progress meters, sliders, spin buttons, gauges, clocks, borders, popup menus, popup notes, and even a splitter bar to let us change the relative size of two parts of an Access form.
The new Resize control (for Access 97 only) seems to have good potential, but may be too limited to be of great value in its current implementation. It automatically resizes the controls on your form when the form is resized, whether manually or when the MoveSize method is used to change the height and/or width of a form.
A common headache for Access developers is deciding what screen resolution users will have and making forms look attractive and readable at that resolution. After you've designed an application to look good on a 640 x 480 resolution, a user with a 20-inch monitor running at 1024 x 768 complains that the forms are all squeezed up into a corner of the screen.
I hoped the Resize control would proportionately move and size all controls when my application resizes a form in the On Load event. Although the controls are resized and moved in proportion to the change in your form's size, no font sizes are changed. This leaves you with an odd-looking form. If you make the form larger than it was originally, the fonts seem much too small. If you make the form smaller, the fonts can become too large for the controls, and data is truncated.
There are other controls that can give your application specialized functionality. Users of your Access application can watch .AVI videos or listen to audio Compact Discs, all controlled by your forms. .WAV and .MIDI files can also be played using another FMS control.
Further controls make it simple to cut, copy, and paste to the Windows clipboard; read or update a Windows .INI file or the Windows Registry with out using API calls; and retrieve a multitude of system information, such as free memory, disk space, the network computer name or user name, CPU type, Windows version, and more. The Timer control (for Access 97 only) lets you place multiple timers on a single form.
If you are new to ActiveX controls, you may find them a bit confusing to use at first. I did. Some are extremely simple to use because they have very few custom properties, but the more sophisticated the control, the more complex the properties and events for that control.
Chapter 3 of the user guide is one of the best overviews of using ActiveX controls that I've seen. Using detailed examples, the manual describes how to add custom controls to your forms and reports, how to set control properties (both standard Access properties and custom properties), data binding, working with custom controls in VBA code, error handling, and when to change a custom control to a picture. The manual includes details on all properties and methods for each control, special instructions on using each control, and details on handling errors returned by the controls.
Total Access Components includes a demo database with informative examples of all the controls in the package. All forms and code are completely unsecured, so you can study the programming methods used in the examples and cut and paste freely into your own applications.
When you use one or more Total Access Components in you r application, you must make sure they get registered on the user's computer. If you use the Setup program generated by the Office Developer's Edition to install an Runtime application, simply include the file TACOMP.OCX in your installation and the controls will be registered when you run Setup. FMS has also included a utility to register or unregister this control if you're using a different setup program.
FMS has chosen to include all the controls for this package in a single .OCX file. This makes distribution and registration simple, but also means you'll be distributing a file that's a bit larger than necessary, unless you've used all 27 controls! The .OCX is 532KB (95/97 version) or 361KB (2.0 version). Compare this to the Outline Control in the Access Developer's Toolkit 2.0 at 411KB, or the 32-bit Tab Control for Access 97, at only 187KB. Even given the slight size disadvantage, I still vote for FMS because of the ease of distribution.
Total Access Components has a lot of bells and whistles, but a lot of substance as well. Most developers will find at least a few controls in this potpourri that can be put to immediate use in their applications.
Diane L Winger is vice president of Winger & Associates, Inc., which has provide custom software solutions to businesses in Colorado for ore than 20 years. She has worked with Access since 1993, and is a co-founder of the Denver-Area Access Users Group..
Supports 32 and 64-bit versions of Microsoft Access 2016, 2013, 2010, 2007, 2003, 2002, and 2000!
Also available for