Creating  
an Access Database:  
A Primer for Resource Center Managers   

 by   
Laura C. Larsson


Creating and Modifying Forms 

Table of Contents

Introduction 
An Example of a Form  
Parts of a Form 
Planning the Forms Using the Serials Database 
Creating a Form using Form Wizard - Simple Instructions  
Creating a Form Using Autoform 
Creating a Form using the Form Wizard 
Modifying a Form 
Creating a Form using Design View 
Creating a Form Table of Content Page Using Switchboard Forms (not covered in workshop) 
Modifying a Form 
Assignment 1 
Assignment 2 
Assignment 3 
For More Information 

Introduction 

There are two ways to enter information into the database. You can use the Datasheet view and key the information directly into a table or you can use a Form. 

Forms enable you to enter data into tables much more simply than trying to enter it into the spreadsheet view. You can enter and view one record at a time. Often this is less confusing to the data entry person since there isn't so much information on the page. Forms look nicer and are generally (if well designed) easier to enter data into. You can also customize the forms by changing arrangement, font, font size and color and by changing the background. Most of the forms will correspond to the tables, but not always.  And you might want to incorporate more than one table into a form to make it easier to enter data. 

Forms allow you to select specific fields from the record to display. You can also specify the field order in the Form. If you use the Design view, you can arrange the fields to meet your needs. A well designed form makes entering data and locating records easier. 

Access enables you to set aside portions of your form for calculations, while lines and rectangles used as graphic elements are designed into the form when you create it. We will not be doing serious calculations in any of our forms. 

You can also create a switchboard form which acts as a table of content to your database. The switchboard form enables you to open other forms or reports.  We will not be covering switchboard forms in this workshop, although you have already seen  what a switchboafd form  looks like in the Students and Classes database. 

Although we will not be discussing it here, you can also create a custom dialog box into which you can enter data, and then carry out a process based on the data you entered. 

Before you begin designing forms, you should be sure that you have created appropriate field types in your tables. A text or memo field is going to work much differently than a number field.  Be sure that you have assigned any table properties. Table properties affect the whole table so it's important to get those right. 

It  makes a fair bit of sense to design forms on paper before you work on designing them in the database, or at least have a clear idea of what you want to include. So, rough out where you want which piece of information and redo till the form works out for reading and data entry. Think hierarchically, since the switchboard is really a menu of options. 

I will often create a shadow database (I call it Serials1) where I do my testing of forms. I then redo them in the "good" or "real" version of the database. 

An Example of a Form 

This is an example of a form from the Students and Classes database. 

 

What does this form enable you to do? It enables you to enter various kinds of information about the student such as contact information, classes taken, Instructor, which department they are in, and quite a bit of information on various assignments. This form is put together from several tables. 
 

Parts of a Form

A form is made up of four parts: 
  • The form header which is composed of title (label), date, and so on
  • A detail section which has the fields and controls and any command buttons that you choose to add
  • The form footer for things like page numbers or other footer information
  • Rulers (both horizontal and vertical) which show you your location on the page

Planning the Forms for the Serials Database

Let's ask ourselves which forms might we want to create which are stand alone and which might we wish to incorporate into one form.  In the table below I've suggested some possibilities but I've also left some space for you to add some additional tables. There may not be enough room in the spaces for all the forms you want to create, but you can add them to your Access database at a later time. 
 
 
Assignment: 

Look at your list of tables and decide which additional forms  you might want to add to the existing list. We will spend a few moments discussing your suggestions. You can create the forms when you have time.

 
Stand Alone Forms
Incorporate (multiple forms)
 
create separate forms for information about the binderies (contact information) use Bindery table create a form for all the bindery operations
  create a form for money transactions (payment for binding and orders/renewals)
create a table to add subjects to the subject table assign subjects to a journal (journal plus subject table
create a separate table for publishers that links from the bibliographic information page, so that if you have already entered the contact information for a publisher, you don't need to re-enter it.  add a form for biliographic information 
Name, editors, publishers
  create a form for adding new bibliographic information about a journal
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Creating Forms for the Serials Database

Access has made it relatively simple to add forms. If you know that you just want a simple form which looks similar to the Dataview table, use the AutoForm feature.  If you have a slightly more complex form, use a Form Wizard which prompts you for information and creates a form based on your answers. Even if you feel comfortable creating forms, you may want to use a Form Wizard to quickly lay out all the controls on your form. Then you can switch to Design view to customize it. 

Be sure to read Optimize form and subform performance in Access Help to get a list of suggestions for making your forms run faster 

Creating a Form using AutoForm

AutoForm is a very simple method of creating forms since it creates a form that displays all fields and records in the selected table or query. Each field appears on a separate line with a label to its left. This method of making forms does not allow you to join tables to create a form. 

From the Database window, click the Tables or Queries tab once and select  the table or query you want to base the form on. Then click the arrow next to the New Object   button on the toolbar, and then click AutoForm.  Access creates the form for you based on the table you select. 

You can also click on the Forms Tab, then Insert | Form, New Form and select the table you wish to base the form on. Forms can also be created from queries. The process is the same. 

 
Assignment 2:  

Create one Form each for the following tables using Autoform: 
 

  • Bindery Table
  • Agent Table
  • Publisher Table
  • Subject Table
  • Be sure to save each table. We will be editing the Publisher form in a bit.

 

Example of the Publisher Table after using Autoform 

Publishers Form as created by Autoform 
 

Note that Autoform just creates a two column list. We will edit it in a few moments to make it look a little better. 

Creating a Form with a Wizard

While you are in the Database window, click the Forms tab, then New. When the New Form dialog box appears, select the wizard that you want to use. Notice that a description of the wizard appears in the left side in the dialog box. Select the name of the table or query that includes the data you want to base your form on. You don't need to do this step if you click the Form Wizard option since you can specify the record source for the form in the wizard. Then click OK

Create a Form with Tabs (discussed but not practiced) 

You can use a tab control or a page break control to create a multi-page or tab form. The advantage to a multi-page form is that everything to perform an action is available without having to return to the Database window and locate the next form, open it up and start entering. 

Since the tab control method is the easiest and most effective way to create a multiple-page form, I will give you those instructions. Use Access help to learn how to create a multi-page form. 

Open an existing form in Design view. In the toolbox, click the Tab Control tool   and then click the form where you want to place the control.  Access adds a tab control with two pages. The first page is on top. The pages will be numbered. 

The next step is to add controls to the tab control. You do this by clicking the tab of the page you want to add controls to. Add controls by using one of the methods listed below: 
 

  • From the View menu, click on Field List, or click the Field List icon on the toolbar to display the field list and drag one or more fields to the tab page. 
  • Select a tool in the toolbox and then click on the tab page. You are allowed to add any type of control except another tab control. 
  • Copy controls from another part of the form or from another page. (Note: you are not allowed to drag controls from another part of a form or from another page.) 
If the tab number assigned by Access is not the one you want, change the name of a tab by double-clicking the page you want to change. This will open its property sheet. Specify a new name in the Caption property. If you don't specify a name in the Caption property, Microsoft Access uses the setting in the Name property. 

If you want to add, delete, or change the order of tabs, click on the border of the tab control with the right mouse button and click Insert Page, Delete Page, or Page Order to make changes. Sometimes the order of controls on the tabbed page needs to be changed for easier movement through the database. To change the tab order of controls on a page, click the page with the right mouse button and click Tab Order

To change the font name, font size, font style, and so on, of pages, double-click the border of the tab control to open its property sheet and then set the appropriate properties. You are not allowed to specify different settings for different pages. A font change, for example, affects all pages. 

Make the tab control as large (or small) as necessary. Test each tab to make sure all the controls fit well within each tab. 

Test the controls in Form view. 
 
 
Assignment 3 

Creating a Form for Entering Bibliographic Information About a Journal 

1. Decide What Constitutes Bibliographic Information 

What Tables and Fields should you use to create a form for capturing bibliographic information about the journal?  Suggestions 

2. Use the Form Wizard to select tables and fields for the form 

3. Make changes to the form 

After we cover the next section, Modifying a Form, you will know how to rearrange the form for easier data entry. 

 

Creating a Form Using Design View

To create a new form, click the Forms tab in the Database window and click the New button. When the New Form windoe appears, select Design View. Click the down arrow and select Editor
New Form Window with Editor table selected
 

Then click on OK. The Form Screen will appear. 

Form Screen
 

The first thing you might want to do is to make the background area where objects will be placed a little larger. Click on the bottom right hand corner of the grey work area, hold the left mouse button down until the cursor changes shape to a four-arrowed icon and drag down and to your right to make the area larger. 

Notice the Toolbox which is a display of the different types of objects that you can put on the background.  (The relations between the Toolbox and the name of the button did not show up as well as expected in the table below, but you can get a better idea by moving your cursor over the various buttons on the Toolbox.) 
 
Left Side Forms DesignToolbox Right Side
Select Objects 

Label 

Option Group 

Option Button 

Combo Box 

Command Button 

Unbound Object Frame 

Page Break 

Subform/Subreport 

Rectangle

  Control Wizards 

Text Box 

Toggle Button 

Check Box 

List Box 

Image 

Bound Object Frame 

Tab Control 

Line 

More Controls

 

You'll use the Forms Design Toolbox to add and change Labels, add toggles, check and radio buttons, and more. A few of the tools from the toolbox are mentioned in the table below. Study the Access help file for additonal tools and design ideas. 
 
 
Most Important Tools in the Forms Design Toolbox
Image  Tool Description
Label Tool Label Use for creating a Text Control including headings or report titles
Option Group Use for 5 or fewer option buttons
Text Use for creating text control objects
Toggle Box Creates an on/off situation
Command Creates a button that runs a macro such as launching the publisher table for data entry on the Bibliographic Data Entry Form
Check Box Creates a check box and a true/false control
Option (Radio) Button Used as an option within a group
 
 

Adding a Label (Label Object)

The Label Object is a static object. It doesn't change as you move between records. It is, essentially, a title.  We will add the title "Journal Editors" (without quotation marks, please). 

From the Toolbox, select the  (Label) button. The cursor will change to a cross hair and the letter A. Click near the top of the form and type in "Journal Editors". Hit Enter, or click once anywhere on the form (except on the label). 

You now have a label which looks like this: 

Journal Editor Label Object
 
(Font style and font size can be changed to the style and size appropriate to your needs by highlighting the label and selecting the style and size you want to appear.) 

Adding a Text Object (Text (Control) Object)

When you are designing forms, the Text Object will be the one that you use the most. There are two different ways we can use Text Objects. We can use the appropriate Toolbox button or the Field List box button. 
 

The Toolbox Button

In the Toolbox, click the  (Text Object) button. The pointer will change to cross hairs and to the two letters ab|. Click once below the title, "Journal Editors". The following image should appear on your work area 
 

Now take the cursor and click on the box that says "Unbound". Type in "Last Name" and click on Enter. You will be using the white box to type in information. Change the Text4 label to read "Editor's Name". Note how the box enlarges to accommodate the text you keyed in. (Please note that on your computer, Text4 may be a different number. It may be Text1. This is an artifact of my having worked on my database to create other forms.)  
 

The Field List Box

From the toolbar under the menu bar at the top of the window, select the  (Field) button.  The Editor table should appear. 
Editor table 

Select the Title field by clicking on it with your left mouse button. Hold the key downand drag the cursor below the Editor's Last Name field. Notice what happens. The Text Object and the Label object are filled in automatically for you by Access. The Label Object has whatever field name was in the table. You can change the Label Object by clicking on the Label Object and changing it. 
 
 
Practice 

Try adding some other fields to the form. Save the form with the name Editors.

When you are done adding fields and have saved the file, change to the form view and take a look at how your form looks. 

In the example below, we see both the Design View and below that the Form View. 

Design View of Editor's Table
Form View of Editor's Table
 

If we wanted to get rid of the Labels for First Name and Middle Initial, here's how we would do it. Select the Text box for each one theText Boxes you want to eliminate and hit the delete key. 
 
 
Questions: 

Note that in the above form we did not include the EditorID. 

Will this oversight affect anything? Should we go back and go into design mode to add this field? What will happen if we don't include that field? 

 

Modifying a Form

Customizing the Look of a Form

While the forms created by Access with your input can look pretty good, you might want to spiff it up a little bit or even change the layout of the controls and labels. 

Here's how you can customize your form. You can change the background, move, size or realign controls(and change font style and size), change the current control to another type such as a radio button (for yes/no responses), change a label text, or add a field or control. 

Rearranging Controls and Labels

When we created the Publishers form using Autoform, I was not very happy with the way it looked. Let's change the appearance to make it look better. 
 
 
Changing a Form Instructions 

Click on the Forms Tab and select Publishers. Click Design. Click on the bottom right hand corner and drag the corner to make the window larger. 

Note that as you select each Text or Label Object, handles appear. Use the upper lef-hand handle to move the objects around and the remaining handles to enlarge or reduce the space in the box. 

Click on the line called Form Footer and drag it down about 1 inch (2.54 cm). Be careful to get the form footer and not the background. The background will drop down as you make the form larger. 

Click on the field label called Notes. On the upper left hand corner you will see a larger pink box. Grab that and drag the field label down to ruler line 3. (Line 3 is a slightly darker line at the 3 inch line), Now drag the Note control box to the same horizontal line, but align the left-hand side of the box to the 1 inch line. Grab the bottom right hand corner of the Notes box and drag it to the 5 inch mark. 

Move the State or Provence Label and control box to the same line as City, and the Country label and control opposite Postal Code. 

Move the Payment Terms control and label to the upper right-hand corner. 

Make the ContactNameFirst control box a little larger. 

Now you're finished with the rearrangement. Save the Form. 
 

 
 

View of the Redesigned Publisher's Form

Revised Publishers' form 
 
 In its redesigned format, it is a much nicer looking format. It is cleaner and better organized. Plus, in its present state, it's much easier to enter data into. 

Creating a Form Table of Content Page Using Switchboard Forms

A switchboard form is a form which makes it easy to navigate around your database. Since we created our own database rather than using the Database Wizard, we would, if we wanted to create a Switchboard Form, have to use the Switchboard Manager to create a Switchboard Form. We will discuss how to create a Switchboard Form, but will not do one as a group for this workshop.  

Here is the Switchboard form from the Students and Classes database for you to look at. 

Switchboard form from Students and Classes
 

From the Tools menu, point to Add-ins, and then click Switchboard Manager. When asked if you'd like to create a switchboard, select Yes. Actually, Access will announce that it was unable to find a valid switchboard in this database and then ask if you'd like to create one. 

Create a switchboard? 

In the Switchboard Manager dialog box, click Edit

image of first switchboard form 

In the Edit Switchboard Page dialog box, type a name for the switchboard in the Switchboard Name box, and then click New

Adding Journal Information to the switchboard 

In the Edit Switchboard Item dialog box, type the text for the first switchboard button in the Text box, and then click a command in the Command box. 

Depending on which command you click, Microsoft Access can display another box below the Command box. You may want to select an item in this box. For example, if you clicked Open Form In Edit Mode in the Command box in step 5, you will need to click the name of the form you want to open in the Form box, and then click OK. 

Repeat these steps until you've added all the menu items to the switchboard. 

If you want to edit or delete an item, click the item in the Items On This Switchboard box, and then click Edit or Delete. If you want to rearrange items, click the item in the box, and then click Move Up or Move Down. Click on the Close button to stop editing the switchboard. 

You can use the Switchboard Manager to create a switchboard that branches to other switchboards. Choose the Go To Switchboard command in the Command box, and then specify the switchboard you want to go to. 

To make the switchboard form open automatically, select the switchboard name in the Switchboard Manager dialog box and make it the Default
 

For More Information 

Read Working with Forms, Working with Controls on Forms and Reports and Optimize form and subform performance in Microsoft Help. 
 

Next: Data Entry 

Back: Building Relationships


Table of Contents | References and Resources | Glossary
Page Updated: July 19, 1998

URL:  http://weber.u.washington.edu/~larsson/conf/aiha98/primer/forms.htm