Locked lesson.
About this lesson
Modify the form created in the previous lesson, set properties and add controls.
Exercise files
Download this lesson’s related exercise files.
Services_04_Start.accdb708 KB Services_04_End.accdb
584 KB
Quick reference
Modify Form, Add Controls
Application Terminology
Add Fields
To add new textbox controls for fields to a form, click Add Existing Fields from the Design ribbon when you are in Form Design View. Resize the field list by dragging its borders. Drag fields from the field list to the form.
Select multiple fields in the field list by clicking the first one and shift-clicking additional fields.
Align Controls
To align controls with each other, select the desired controls, right-click on the selection, and choose Align > Left/Top/Right/Bottom from the shortcut menu.
Caption Property
For a label, the Caption property shows what will be displayed in the control. Users see captions.
Combo Box Control
A Combo Box show a list of choices from a different table than the one you are entering data into.
To change a textbox control to a combo box, right-click on it in Design View and choose:
Change To > Combo Box.
Set properties of the combo box to tell Access where the data will come from for the list, what columns will show, how wide each column will be, and how wide the list will be.
The main properties to set for a combo box are: Row Source on the Data tab, and on the Format tab: Column Count, Column Widths, and List Width. List Width is generally the sum of the column widths + 0.2 inches for a scrollbar. To hide a column, set its width to 0.
When you are looking at the data for a combo box, it is handy to open NotePad and record settings for properties.
Design View
The Design View of a form enables you to make changes such as adding and resizing controls. Yu cannot see data in this view.
Form Detail Section
The detail section appears once for every record and usually contains controls to show and edit your data.
Form Footer Section
The form footer section shows once at the bottom of a form. This a good place to put information that the user does not fill out like tracking fields (when a record was added and edited), and the primary key.
Form Header Section
The form header section shows once at the top of a form. This for a form title and, in the case of a multiple items form, the labels for each column.
Form View
The Form View of a form enables you to see the data, add, and edit.
Layout View
Layout View gives you limited design capabilities such as resizing and setting properties while you can see data.
Move Controls
To move controls, click and drag them. When controls are associated, such as a label and a textbox, they move together. To move associated controls independently, drag by the big handle in the upper left corner.
Name Property
Every control has a name that will be used to refer to the control. Users do not see the control names.
Resize Controls
To resize controls, drag a resizing handle on one of the sides.
Resize Sections
To close up space in a form section, move the mouse to the bottom of the section. When the mouse shape changes to a horizontal line with a double-headed vertical arrow, click and drag up.
To close space from the right side of a form, move the mouse to the right edge. When the mouse shape changes to a vertical line with a double-headed horizontal arrow, click and drag to the left.
Ruler
To toggle the display of the horizontal and vertical rulers on and off, right-click on a section bar and choose Ruler from the shortcut menu.
Select Multiple Controls
To select multiple controls, click on the first one and shift-click other controls to toggle them in or out of the selection.
Use the vertical and horizontal rulers to select multiple controls. When you click (and optionally drag), any control that the imaginary line (or rectangle) touches will be selected when you let go of the mouse.
Tracking Fields
Tracking fields are fields that the system fills in such as when a record was added and when it was edited.
Width Property
The width of a control will be stored in dimensions local to your region such as inches or centimeters.
Steps
Turn on Rulers
- In Design View of a Form or Report, right-click on a blank area
- Toggle the display of the Rulers on or off using the shortcut menu
Select Controls Using Vertical Ruler
- In Design View of a Form or Report, move mouse to the Vertical Ruler at the position of the controls you want to select
- Click and note the imaginary line going across at the position where you see
- Everything the line touches will be selected when you let go of the mouse
- Alternately, you can click and drag to select controls that the imaginary rectangle touches.
Resize Section
- In Design View of a Form or Report, move the mouse to the bottom boundary of a section
- Click and Drag when the shape of the mouse pointer changes to
Basic Control Properties for Positioning
- Left
- Top
- Width
Lesson notes are only available for subscribers.