Using the Field List to add a control
The Field List displays a list of fields from the table or query the form is based on. You add bound controls to the form by dragging fields from the Field List onto the form. Select and drag them one at a time, or select multiple fields by using the Ctrl key or Shift key.
- Select multiple contiguous fields by holding down the Shift key and clicking the first and last fields that you want.
- Select multiple noncontiguous fields by holding down the Ctrl key and clicking each field that you want.
Click the Add Existing Fields command in the Design tab’s Tools group to display the Field List. By default, the Field List appears docked on the right of the Access window, shown in Figure 35-9. This window is movable and resizable and displays a vertical scroll bar if it contains more fields than can fit in the window.
FIGURE 35-9
Click Add Existing Fields in the Tools group to show the Field List, docked on the right of the Access window.
Generally, dragging a field from the Field List window adds a bound text box to the Form Design window. If you drag a Yes/No field from the Field List window, you add a checkbox. If you drag a field that has a Lookup property, you add a List Box control or Combo Box control. If you drag an OLE field from the Field List window, you create a bound object frame. Optionally, you can select the type of control by selecting a control from the Controls group and dragging the field to the Form Design window.
You gain several distinct advantages by dragging a field from the Field List window:
- The control is bound automatically to the field that you dragged it from.
- Field properties inherit table-level formats, status-bar text, and data-validation rules and messages.
- The label control and label text are created with the field name as the caption.
- The label control is attached to the field control, so they move together.
Select and drag the Description, Category, RetailPrice, and AuctionEndDate fields from the Field List window to the form, as shown in Figure 35-10. Double-clicking a field also adds it to the form.
FIGURE 35-10
Drag fields from the Field List to add bound controls to the form.
You can see four new controls in the form’s Design View—each one consists of a Label control and a Text Box control (Access attaches the Label control to the text box automatically). You can work with these controls as a group or independently, and you can select, move, resize, or delete them. Notice that each control has a label with a caption matching the field name, and the Text Box control displays the bound field name used in the text box. If you want to resize just the control and not the label, you must work with the two
controls separately.
Close the Field List by clicking the Add Existing Fields command in the Design tab’s Tools group or the Close button on the Field List.
In Figure 35-10, notice the difference between the controls that were dragged from the Field List window and the controls that were created from the Controls group. The Field List window controls are bound to a field in tblProducts and are appropriately labeled and named. The controls created from the Controls group are unbound and have default names. The default names are automatically assigned a number according to the type of control.
Later, you learn how to change the control names, captions, and other properties. Using properties speeds the process of naming controls and binding them to specific fields. If you want to see the differences between bound and unbound controls, switch to Form View using the View command in the Home tab’s Views group. The Description, Category, RetailPrice, and AuctionEndDate controls display data since they’re bound to tblProducts. The other three controls don’t display data because they aren’t bound to any data source.
// Related Posted - GOOGLE!
Related Websites
- PokerStars Grand Lisboa Breaks Macau Player Field Record PokerStars Macau at Casino Grand Lisboa made history last weekend as the “Macau Millions” smashed the all-time record for player...
- Virtualizing the DC: Windows Time Sync & Hyper-V Powered Domain Controller dilemma So, why will somebody want to run a Hyper-V Virtual Server with Domain Controller role in production? There are lots...
- Excel How-to: Creating a Pivot Table A pivot table is a merely a summary of data in a format that you can manipulate to suit your...
- Crowne Plaza Invitational at Colonial Tournament Recap The latest tour stop at the Colonial Country Club proved to be an interesting tournament, with key players making both...
- The Florida Gators Win Against the Cincinnati Bearcats The Florida Gators defeated the Cincinnati Bearcats at the Louisiana Superdome on New Year's Day in the 76th annual Sugar...


