A4.2 Tutorial 4 Creating Forms and Reports
Session 4.1
Creating a Form Using the Form Wizard
A form is an object you use to maintain, view, and print records in a database. In Access, you can design your own forms or use Form Wizards to create them for you automatically.
You used the AutoForm Wizard, which creates a form automatically using all the fields in the selected table or query, to create the Customer Data form. To create the form for the Order table, you’ll use the Form Wizard. The Form Wizard allows you to choose some or all of the fields in the selected table or query, choose fields from other tables and queries, and display the chosen fields in any order on the form. You can also choose a style for the form.
To open the Restaurant database and activate the Form Wizard:
- Open database, e.g., Restaurant
- Click Forms tab
- Click New button
- Click Form Wizard, click list arrow for choosing table or query, click, e.g., Order to select this table as the source for the form, then click OK button.
To finish creating the form using the Form Wizard:
- Click, e.g., OrderNum in the Available Fields list box (if necessary), and then click the [>] button to move the field to the Selected Fields list box.
- Repeat the same process for each desired field in the order you want them to appear.
- Click the Next button
- Select layout of radio button for Columnar, Tablular, Databsheet, or Justified.
- Click Next button
- Click the desired Form Wizard style, called an AutoFormat. You can change it later even after exiting the Form Wizard.
- Click Next button
- Type in the title for the form, under which it is saved and is printed at top of form
- Click radio button of option of displaying form to 1. View or enter information, or 2. Modify the form’s design.
- Click Finish button to complete form.
Changing a Form’s AutoFormat
You can change a form’s appearance by choosing a different Autoformat for the form. As you learned when you created the Order Data form, an AutoFormat is a predefined style for a form (or report). The AutoFormats available for a form are the ones you see when you select the form’s style using the Form Wizard. To change an AutoFormat, you must switch to Design view.
REFERENCE WINDOW: CHANGING A FORM’S AUTOFORMAT
- Display the form in Design view.
- Click the AutoFormat button on the Form Design toolbar to open the AutoFormat dialog box.
- In the Form AutoFormats list box, click the AutoFormat you want for the form, and then click the OK button.
To change the AutoFormat for the Order Data form:
- Click the View button for Design view on the Form View toolbar. The form is displayed in Design view. You use Design view to modify an existing form or to create a form from scratch.
- Click the AutoFormat button on the Form Design toolbar. The AutoFormat dialog box opens.
- Click the Options button to display the AutoFormat options. A sample of the selected AutoFormat appears to the right of the Form AutoFormats list box. The options at the bottom of the dialog box allow you to apply the selected AutoFormat or just its font, color, or border.
- To select, e.g., Standard style (AutoFormat), click Standard in the Form AutoFormats list box, and then click the OK button. The AutoFormat dialog box closes, the AutoFormat is applied to the form, and the Form window in Design view becomes the active window.
- Click the View button for Form view on the Form Design toolbar. The form is displayed in Form view with the new AutoFormat.
- Click Save button on Form View toolbar to save the modified form.
Navigating a Form
To maintain and view data using a form, you must know how to move from field to field and from record to record. The mouse movement, selection, and placement techniques to navigate a form are the same techniques you’ve used to navigate a table datasheet and the Customer Data form you created in Tutorial 1. Also, the navigation mode and editing mode keystroke techniques are the same as those you used previously for datasheets.
To navigate through the form:
- Press the Tab key to move to the CustomerNum field value, and then press the End key to move to the Paid field. Because the Paid field is a yes/no field, its value is not highlighted; instead, a dashed box appears around the field name to indicate it is the current field.
- Press the Home key to move back to the OrderNum field value. The first record in the Order table still appears in the form.
- Press Ctrl + End to move to the Paid field in Record 104, which is the last record in the table. The record number for the current record appears between the navigation buttons at the bottom of the form.
- Click the Previous Record navigation button [<] to move to the Paid field in record 103.
- Press the up-arrow key twice to move to the InvoiceAmt field value in record 103.
- Position the insertion point between the nubmers 2 and 6 in the InvoiceAmt field value to switch to editing mode, press the Home key to move the insertion point to the beginning of the field value, and then press the End key to move the insertion point to the end of the field value.
- Click the First Record navigation button [|<] to move to the InvoiceAmt field value in the first record. The entire field value is highlighted because you have switched from editing mode to navigation mode.
- Click the Next Record navigation button [>] to move to the InvoiceAmt field value in record 2, which is the next record.
Finding Data Using a Form
The Find command allows you to search the data in a form and to display only those records you want to view. You choose a field to serve as the basis for the search by making that field the current field; then you enter the value you want Access to match in the Find in field dialog box. You can use the Find command for a form or datasheet, and you can activate the command from the Edit menu or by clicking the toolbar Find button.
REFERENCE WINDOW: FINDING DATA
- On a form or datasheet, click anywhere in the field value you want to search.
- Click the Find button on the (Form View) toolbar to open the Find in field dialog box.
- In the Find What text box, type the field value you want to find.
- Complete the remaining options, as necessary, to specify the type of search you want Access to perform.
- Click the Find First button to have Access begin the search at the beginning of the table, or click the Find Next button to begin the search at the current record.
- Click the Find Next button to continue the search for the next match.
- Click the Close button to stop the search operation.