Making Forms More Usable with Controls

In this Access forms tutorial you will learn how to make Access forms more usable with controls while increasing the integrity of your Access database.

Introduction

Access 2007 You've already seen how a combo box control can make a form more user friendly. In Access 2007, there are several additional ways you can modify forms to make them easier to use while also increasing the integrity of the database. In this lesson, we'll explain how to use form properties to limit the actions your form users can take. We'll also walk you through hiding fields on a form and adding command buttons to the form.

Making forms more usable

Making forms more useable

You already know that forms can help you increase the integrity of your data by limiting what you see and how you can enter data. You saw that using a drop-down list can make data entry easy. Now it's time to think about the design of your forms from a form user's perspective.

Let's look at the Orders form in our bookstore scenario. The basic form, which was created with the Form command, looks like this:

Orders FormOrders Form

This form is where we would want our user—the store employee—to pair a customer with a book to complete an order. Let's look at the form from the user's point of view:

Setting form properties

Access 2007 allows you to set several form properties. Form properties are options that are set in Design view on the Property Sheet, like the one shown below. These options control how the form looks, works, and interacts with the rest of the database.

Property SheetProperty Sheet

To set form properties:

Property SheetSetting Field Properties with the Property Sheet

Tip: Use the tabs to find the specific property you want to set. Use the help available to you in the bottom-left corner of the Access window to know what each property setting does.

Hiding fields on a form

There will be times when a field will not be needed on a form. Access 2007 allows you to hide fields by setting the Visible field property in Design view.

To hide a field on a form:

Creating combo boxes

For the New Orders form in our bookstore example, we created user-friendly drop-down lists using the Combo Box command. These drop-down lists help our users identify a specific customer and specific book using more useful information than the Customer ID and Book ID numbers, as seen below.

New Orders FormNew Orders Form with Drop Down Lists

For more information on creating combo boxes, visit this lesson.

Setting field properties

Sometimes it may be necessary to set field properties from the form itself. For example, on the New Orders form for our bookstore shown below, we want to set up the Order Date field to auto-fill with the current date each time an order is entered. This way, our employees will not have to worry about entering a date on the form because the form will do it for them.

New Orders FormNew Orders Form

To set field properties from a form in Design view:

In our example, we want to set the Order Date field to auto-fill with the current date. Refer to the picture below. Notice that we have the Order Date field highlighted on the form itself. On the Property Sheet, we have Order Date showing in the Selection type drop-down list.

Setting Order Date on New Orders FormSetting Properties for Order Date on the New Orders Form

Because we want the Order Date to auto-fill, we must set the default value to always enter the current date.

To set a field to auto-fill with the current date:

Creating command buttons

Another way to make a form more user friendly is by adding command buttons to the form. Command buttons are a quick way for form users to take a specific action. These command buttons are grouped into categories of actions, including:

To add a command button to a form:

The command button should be operational and appear on the form in Form view.

Challenge!

If you haven't already done so, save the sample Ready2Read database to your computer.