-
In the Navigation pane,
click Customers. Then on the
Create tab, in the Forms group, click the Form Wizard button.
The Form wizard starts.
-
Display the Tables/Queries list, and click Table: Categories. In the Available Fields list, double-click
CategoryID to move it to the
Selected Fields list, and
double-click CategoryName. Then
click Next.
On the wizard’s second page, you choose a layout for the new
form. The preview area on the left shows how the form will look
with the selected option applied.
-
With Columnar selected,
click Next.
On the wizard’s last page, Access suggests the table’s name
as the title of the form.
-
With Open the form to view or enter
information selected, click Finish.
The new Categories form opens.
-
Scroll through a few records by using the controls
on the record navigation bar at the bottom of the form.
Let’s make a few changes in Design view.
-
On the View Shortcuts
toolbar, click the Design View
button.
Access displays the design grid for the Categories
form.
-
On the Design contextual
tab, in the Themes group, click
the Themes button. Then in the
gallery that appears, click the Austin thumbnail.
You might notice only a subtle change in the font used for
the control text. But behind the scenes, Access also makes the
color scheme of the Austin theme available to the form.
-
Click the Form Header
section bar to select that section. Then on the Format contextual tab, in the Control Formatting group, click the
Shape Fill button. Under
Theme Colors in the palette
that appears, click the third box (Light
Green, Background 2).
-
Point to the bottom of the Form
Header section (just above the Detail section bar), and
when the pointer changes to a two-headed arrow, drag downward to
enlarge the section until you can see the entire Categories title control.
-
Click the Categories
title control. On the Arrange
contextual tab, in the Sizing &
Ordering group, click the Size/Space button.
A list of sizing and spacing options appears.
-
Under Size in the list,
click To Fit.
-
Point to the bottom of the Form
Header section, and drag upward until the section is
just tall enough to contain the title control.
-
In the Detail section,
click the CategoryID text box
control, and on the Design
contextual tab, in the Tools
group, click the Property Sheet
button.
Keyboard Shortcut
Press F4 to open the Property Sheet.
-
In the Property Sheet,
click the Data tab. Click the
Enabled property, click its
arrow, and click No. Then close
the Property Sheet.
Disabling the CategoryID text box control changes its text
and background to gray, indicating that users can no longer change
this value.
-
Click the Category
Name label, double-click Category, and then delete it and the
following space.
Now let’s add the category description from the Categories
table to this form.
-
Point to the bottom of the Detail section, and drag downward until
the section is about 2.5 inches tall. Then point to the right edge
of the section and drag to the right until the section is about 5
inches wide.
-
On the Design tab, in the
Tools group, click the
Add Existing Fields
button.
Keyboard Shortcut
Press Alt+F8 to open the Field List.
The Field List opens.
-
In the Field List, click
Description, drag the field
below the Category Name text
box control in the Detail
section, and then close the Field
List.
-
Point to the border of the Description text box control, and drag
the control so that its left edge is aligned with the Category Name control above and its top
edge sits at the 1 inch mark on
the vertical ruler.
Tip
If you indicate the border of a control of zone of text and trail it on a new site, the associated label moves with him. In the same way, if you indicate the border of a control and an obstacle of label, control associated with zone of text moves as well. If you want to move one or the other of control independently of the other, you must trail the great gray place in the corner upper-left of control.
-
Click the Description
label control, and drag the large handle in the upper-left corner
to the left until the control is aligned with the labels above.
Then widen the control to match the other controls.
-
Hold down the Shift key, and click the Name and CategoryID labels to add their controls
to the selection. Then on the Format contextual tab, in the Font group, click the Align Text Right button.
-
Make the Detail
section just tall enough to contain its controls.
The form now occupies the smallest possible amount of
space.
-
On the View Shortcuts
toolbar, click the Form View
button.
You can now see the results of your changes.
-
Scroll through a few category records. Try to edit
entries in the CategoryID field
to confirm that you can’t.
We don’t need the record selector bar down the left side of
this form, so let’s return to Design view and turn it off.
-
Switch to Design view, click the form selector (the box in
the upper-left corner at the junction of the horizontal and
vertical rulers), and then display the Property Sheet for the form.
-
On the Format page of the
Property Sheet, change the
Record
Selectors property to No. Then close the Property Sheet.
-
Switch to Form view to verify that the form no longer has a
record selector.