Information Systems for Managers
Create Data Entry Form in Access
We now turn our attention to creating the data entry form. As discussed
before, a data entry form makes the user's job easier by automating
some
of their tasks, and makes sure that only proper data is accepted into
the
database.
We will start by letting Access automatically create a data entry
form
(hereinafter called just form), and then customize it to our
needs.
Click on the Forms button, then double-click Create
Form by using
Wizard.

Access (and other Microsoft products) make use of Wizards to
automate many
tasks. Often, it is efficient to let the Wizard do most of the work for
you and
then manually finish the task. We'll adopt this strategy in creating
the form.
Typically, a Wizard will ask you a series of questions. In this
example, supply
the following answers:
- Which fields do you want on your form? - We'll be using
all the fields from the Correspondence table, so you can move
all the fields from the "Available" to the "Selected" area. The double
arrow (>>) will do this quickly.
- What layout would you like for your form? - You can
experiment with the different layouts, but for this exercise, choose Columnar.
- What style would you like? - Again, you can play with the
different styles; for this exercise we'll use the simple Standard
style.
- What title would you like for your form? - In this
exercise the database is fairly straightforward, so we can call it Correspondence.
In more complex databases with multiple forms and tables, you
would want to give the form a more descriptive name.
On the last screen, make sure the option is chosen to "Open the form
to
view or enter information" and then click on the "Finish" button.
After a few seconds, the data entry form will appear on your screen.

Note how the form uses combo boxes for the CorrespondenceForm,
AssignedTo,
Category, ResponseForm, and Closed fields. This reflects the
specifications
chosen as the table was defined. For the other fields this form is very
utilitarian; it only provides spaces to enter data
into the table. The VCR-type buttons on the bottom of the form are used
to navigate
through the table and add new records.
The form can be customized to provide more help to the person
entering
data. To get started, we must go from a data-entry to a form-design
mode.
Click View on the menu on top of the screen, then Design
View.

There are many tools available to customize the form; we'll only
touch
on a few of them. First, you have to understand the terminology of
what's
happening.
Each component on the form is called a control by Access.
So
a form consists of a set of different kinds of controls. Controls can
be used to accept data
into the table, perform processing, or simply display data. In defining
controls that accept data, Access has to be told which data element is
linked to the control. Types of controls include:
-
Text boxes - for accepting and displaying data. Text boxes
have
two comoponents; a label that describes what goes in the text box, and
the space for actually entering and displaying data. The label is also
called a
"prompt". Most of the controls in this form are at present text boxes.
-
Labels - for displaying static information. Labels can be
used to
display a title of the form, for instance.
-
Combo boxes - for providing the user with a list of
predefined valid
values from which to choose. For instance, we previously specified that
whenever
the "AssignedTo" field is displayed for data viewing or entry, a combo
box
control is used.
Note that to the left is a Toolbox, which displays the types of
controls that are available. (If you don't see a toolbox, click on
"View" menu at the top of the screen, then select
"Toolbox."). To add a new control to the form, simply click
on the control in the Toolbox, then click on the chosen location on the
form. To manipulate a control, you first have to select it.
This
is done by clicking on it. A control will show that it's selected by
"handles"
around it. Once selected, a control can be moved, resized, or have its
properties
adjusted.
Each control has a set of properties that you as the designer can
change
to affect how the control operates. Some of the more important parts of
a control's properties include:
-
Data source - which data element in the table is this
control associated
with
-
Input mask - defines how data would be accepted and
formatted as
it is typed into the field. An input mask is like a template or a
pattern.
They are useful for guiding the user through entering data into a
particular
field. Access has several commonly-used input masks that are available,
like date, phone numbers and social security numbers. An input mask for
social security number would only accept the digits 0 through 9. The
user
would not have to enter the dashes, but they would appear on the
screen.
For example, the user would just type the 9 digits in a row
(i.e.:352449888)
but it would appear as 352-44-9888. The dashes would not be stored in
the
table.
-
Default value - a value for the field that will show up when
the
user starts to enter a new record.
There are many other properties that you can adjust to fine-tune the
behavior
of a control. Different types of controls have different sets of
properties.
To bring up a list of the control's properties, you can right-click on
any control to bring up a small menu. Select Properties to
view
and change the control's properties.

Below is the form after having been customized. The following things
have been done, to hopefully stimulate your imagination as to the
possibilities:
-
The IDNumber is automatically maintained by Access. As such, you don't
want the user changing it. The Locked property for this
control
has been changed to Yes, which prevents the user from making
changes
to this field. Clicking on the X will close the Properties
panel.
-
The controls for the two date fields (DateReceived, ResponseDate)
have been given input masks that make them accept data in the form of mm/dd/yy.
To do this, right-click on the control, click on Properties,
then
click on the Data tab. Clicking on the Input Mask area
will
reveal a small box, as illustrated in the diagram above. Clicking on
the
box will invoke Access' Input Mask Wizard, which will ask you to select
a predefined mask, or create your own. Select Short Date, then
click
on Finish.
-
A Label control has been added to the right of the SenderName
field,
prompting the user to enter last name first.
Here's what the form now looks like, with some data entered. Note
how
the combo box for AssignedTo works.

There are many more things you can do in Access to customize the
form.
You can add graphics, lines, and color, change fonts, and do a
multitude
of special processing to make the form more user-friendly and ensure
proper
data entry.
The next step after creating the form is entering some records. This
is necessary to do the next steps, designing a query and a report.
Next: Designing a query