Adding new controls to forms will probably be a frequent task. You might need to display the results of an expression (in a calculated control), or you might need to expand your form’s functionality as your application grows. (You probably won’t add controls to reports quite as often.) The Toolbox offers quick access to native controls. (The term native controls refers to the controls that come with Access.) The Toolbox is actually a toolbar that you can toggle on and off by clicking the Toolbox button on the appropriate design toolbar (Form Design, Report Design, or Page Design). In Page Design view, the Toolbox offers more controls than in other design views.
Follow these steps to insert a native control on a form. (You can use the same steps to insert a control on a report or a data access page.)
Figure 8-1. The mouse pointer represents the type of control you clicked in the Toolbox.
Using Non-Native Controls
Click the More Controls button in the Toolbox to display a long list of available controls that aren’t native to Access. Most of these controls are Microsoft ActiveX controls and are installed by other software. As long as you have a legitimate license for the hosting software, you might be able to use these controls in your Access applications, but this ability can’t be taken for granted, because some applications do limit use of controls to only the host software. You should also refer to the host software’s licensing information before you distribute a non-native control in an Access application.
If you have the Developer Edition of Microsoft Office XP (often called MOD), you have a set of extra ActiveX controls that will work when used on Access forms. Although these controls don’t appear in the Toolbox, they can be located in the More Controls list—scan for controls whose names start with Microsoft and end with version 6.0, such as the Microsoft Common Dialog Control, version 6.0.
To insert several controls of the same type at one time, follow these steps:
As mentioned, the Toolbox is actually a toolbar, which means you can move it around or dock it (attach it to a border). When you first install Access, the Toolbox opens as a floating (undocked) toolbar. Busy or large forms can be a challenge to work with in Design view, and you might want to move the Toolbox to accommodate your form. You can do so simply by clicking the Toolbox’s title bar and then dragging the Toolbox to another location. The Toolbox doesn’t have a default position, so closing the Toolbox has no effect on its position or state. Access simply remembers where the Toolbox was the last time it was open and returns it to that location. If the floating Toolbox is in the way, you can move it or dock it in one of two ways:
To undock the Toolbox, drag the handle—the small raised rectangle at the left end of the docked Toolbox (see Figure 8-2)—away from the docked position, and then release the handle.
Figure 8-2. Drag the Toolbox by its handle to any border, and then release it to dock it.
tip - Resize the Toolbox