Creating a Form

As stated previously, FORMS are used to display data from one or more tables or queries. They are also used to enter data into the database in a more user-friendly way than with a table. The process of entering as well as viewing data is very similar to the process use to enter and view data in a table. Forms can also contain controls that allow the user to easily view, enter and edit data.

Getting Started Creating a Form Using the Form Wizard Modifying a Form Using Design View  Entering Data Using a Form

Getting Started with Forms

To create a form, you must first click on Forms in the Database window under Objects along the left. 

Now you have three choices. You can create a form by:
  • double-clicking on Create form in Design view 
    • this will allow you to design your own form
  • double-clicking on Create form by using wizard 
    • the wizard will walk you through the steps of creating a form 
  • clicking the New button on the toolbar
    • clicking this button gives you access to additional wizards
Generally speaking, the simplest approach to creating a form is to start by creating a from using the Form Wizard, then enhancing that form in Design view. We will now create a form for inputting data into the Student List database.

Using the Form Wizard

  • Begin by double-clicking on Create form by using wizard 
  • Click on the double arrow right button to move all of the fields under Available Fields to Selected Fields  
    since this will be our data entry form, we want all of the fields to be in the form
  • The dialog box will now look like this:
    • the Selected Fields box contains a scrolling list of all of the fields in your database

  • Click  
    • Note the four different types of layouts
    • Click on each one and note the preview box
    • Select Justified for the data entry form.
  • Click  
    • Note the ten different styles for layouts
    • Click on each one and note the preview box
    • Choose a style for the form that you like from the list.
  • Click  
    • Enter Data Entry Form for the title of the form
    • Make sure the Open the form to view or enter information is selected 
  • Click
A new form will open entitled Data Entry Form that displays all of the information one record at a time. To navigate from one record to the next, use the navigation tools at the lower right of this window:

  • the number in the middle indicates which record is currently being displayed
  • the number at the right is the total number of records in your database
  • the arrowheads on either side of the record number if clicked will move you one record back (arrow head left) or one record forward (arrow head right) from the current position
  • the arrowhead with a vertical line will move you to the first record (arrow left with line) or to the last record (arrow right with line)
  • the arrow with a asterisk is a New Record button; clicking it will add a new record to the database, you will now see a blank form
If you return to the Student List : Database window with Forms selected, you will see a new item in the window. Anytime you want to browse the records in your database, edit existing records, or add new records, simply double-click on Data Entry Form 

Try creating other simple forms using the wizard

Modifying a Form in Design View

Now that we have create a form using the wizard, we will use Design View to change its appearance and add a control or two. 

With the Data Entry Form visible, switch from Form view to Design view. During the design process, you can switch back to Form view to see the results of your design. Switch back-and-forth often!

You will need to access the following items during the design process:

If you want this

Click on this to show the item

The Toolbox allows you to add controls to your form

The Field List shows the fields from the
table or query to which the form is bound

The Properties box allows you to modify the properties of
the form itself or any part of the form (a section or a control)

The Formatting Toolbar

This toolbar allows you to change the format of a field or its label. In Access terminology, you are changing the Properties of a control.
  • from the left, the first drop-down list tells you what object is selected. In this case, the label for the field called Name is currently selected
  • next is the Font Drop-Down list
  • then the Font Size Drop-Down list
  • etc.
To change the properties of a control, you must first select the item by clicking on it. 
  • When selected, selection “handles” will appear on the object (control)
  • Once selected, you can use the Formatting toolbar or the Properties box to change the format
  • or you can move the object by clicking and dragging on the border not on any “handle”
  • or you can resize the object by clicking and dragging on one of the “handles” not on a border

Modifying and Enhancing the Data Entry Form

Appearance of Field Labels Rearranging Fields and Field Names Adding a Header Using Properties to Control Data Display
Changing the Appearance of Field Labels
First, let's change the font and style of the field labels
  • Click once on the field label Name. It will become selected and you will notice selection “handles” on the field
  • Now shift-click on each of the other field names until all of the fields are selected.
  • Using the Font Drop-Down list, change to a different font
  • Using the Font Size Drop-Down list, change to a different font size
  • Using the Font/Fore Color button, change to a different font color
  • Click anywhere in blank space to deselect the field labels
Rearranging Fields and Field Names
Next let's rearrange the fields and field names. Instead of accepting what Microsoft Access has given you, you can place the fields and field names in any position you choose. To do this you
  • Moving objects in the form
    • Select an item, field name or field label, and move it by dragging
    • Select an item, field name or field label, and nudge it by pressing the CTRL key and one of the arrow keys to “nudge” the item in the direction of the arrow
    • You can move more than one item at a time by using the Shift-Click technique to select multiple items before dragging or nudging
  • Resizing the form
    • To enlarge the form itself, move the mouse pointer to the edge of the form. When it changes to black line bisected by a double-headed arrow, you can drag to resize
  • Resizing objects
    • Field Names or Field Labels can be resized as well by “dragging” one of the handles after the object is selected.
    • The mouse pointer will change to a double-headed arrow when you point to a handle
    • When that happens, you can now drag to resize the object
Adding a Header
Let's add a title to this form. You do this by inserting a header.
  • Move your mouse pointer to the top of the bar that reads Detail. When the mouse pointer changes to a black line bisected by a double-headed arrow, drag down to create space for the header.
  • Click on the Toolbox button to open the toolbox
  • Click on the Label button to select it
  • Move the mouse pointer to the Header area, note that it changes to the letter A with a +
  • Drag to make a label in the Header area. The size of the label should approximate the desired size of your header. You will be able to resize the header later if necessary.
  • Enter the text desired for your header.
  • Click anywhere not on the label to deselect it.
  • Now click on it to select it as an object (note the select handles). The Formatting Toolbar will now be active.
  • Change the Font, Font Size, Font Style, Font Color and background color of the header.
  • Nudge the label so that its left edge is aligned at the left edge of the form. 
  • Now stretch the label object so that its right edge is aligned at the right edge of the form.
  • Now center align the text within the label box.
Using Properties to Change Data Display
You can use what Access calls an Input Mask to control the entry of data in a form. To do so
  • select the Phone (H) field
  • click on the Properties Properties button button or right-mouse click and select Properties
  • click on the Data tab in the Properties Dialog Box for that field
  • click in the Input Mask box
  • then click on the button that will appear to the right of that box

The Properties Dialog box for the field Phone (H).
Note the "3 dots" button to the right of the Input Mask box.

  • the Input Mask Wizard opens

The First Screen of the Input Mask Wizard

  • select the desired Input Mask from the scrolling list (since this is a field for a phone number, the Phone Number mask has been selected.
  • click and in most cases you need change nothing in the second screen
  • click and choose how you want the data to be stored; in most cases you can just flip a coin here (after all, you are really interested in how the data is displayed, not how it is stored)
  • note the Try It: boxes in each of the screens
  • click and then click  
  • you can now close the  Properties dialog box for the field Phone (H)

Entering Data on Forms

The process of data entry and data editing is simplified when you use a form as compared to doing the same with a table.

Use the <Tab> key to move from one field to another
and/or use the mouse to move from one field to another, especially when you must click a button or pull-down a list to complete data entry

Enter the Data for the Student List

Enter the names of 6 students for your database

Now, try designing other forms!


Go Back


Copyright © 2003
last updated August 12, 2003