Objective 2. Use a Form to Add and Delete Records

Adding and deleting records using a form helps to prevent data entry errors, because the person performing the data entry is looking at only one record at a time. Recall that your database is useful only if the information is accuratejust like your personal address book is useful only if it contains accurate addresses and phone numbers.

[Page 1054]

Activity 3.2. Adding Records to a Table Using a Form

Forms are based on, bound to, a table where the records are stored. That is, when a record is entered in a form, the new record is added to the corresponding table. The reverse is also truewhen a record is added to a table, the new record can be viewed in the corresponding form. In this activity, you will add a new record to the Club Members table using the AutoForm that you just created.


In the navigation area of the new form, click the New Record button .

The form is cleared so a new record can be entered. This will increase the number of records in the table to 13.


In the Student# field, type 22202 and then press .

Use the key to move from field to field in a form. This is known as the tab orderthe order in which the insertion point moves from one field to the next on a form when you press the key. After you start typing, the pencil image displays in the gray bar to the left.


Continue entering the data as shown below using your own name and then compare your screen with Figure 3.3.

Figure 3.3.


First Name

Last Name


Email Address




(312) 555-0022


Alert!: Does a Blank Form Display?

If you press or after typing the Email Address, the record you entered is saved and a new blank form displays. If this happens, click the Previous Record button to view the record you just entered.

[Page 1055]

Activity 3.3. Deleting Records from a Table Using a Form

You can delete records from a database table using a form. In this activity, you will delete a record in the Club Members tablethe record for Alphonse Moore.


With the Club Members form open, click in the Last Name field, and then on the Form View toolbar, click the Find button . Alternatively, press to open the Find and Replace dialog box.


Notice that the Look In box indicates the Last Name field, then in the Find What box, type Moore Click Find Next and then compare your screen with Figure 3.4 to confirm that the record for Alphonse Moore displays.

Figure 3.4.


Close the Find and Replace dialog box. In the form, click anywhere in the bar to the left of the record.

The bar is selected; this area is the record selector. When the record selector is highlighted in blackselectedall the fields in the displayed record are selected. The record selector in the form is similar to the record selector in a table. The record selector selects an entire record in a form, just as the record selector in a table selects the entire row (record) in the table.


On the Form View toolbar, click the Delete Record button to delete the record for Alphonse Moore. Alternatively, press on the keyboard.

The record is removed from the form and a message displays alerting you that you are about to delete a record. If you click Yes and delete the record, you cannot use the Undo button to reverse the action. If you delete a record by mistake, you must re-create the record by re-entering the data.

[Page 1056]


Click Yes to delete the record and reduce the number of records in the table to 12. On the title bar of the Club Members form, click the Close button to close the form.

The Tables object list displays because the Club Members table was selected to create the Club Members AutoForm.


Double-click the Club Members table to open it in Datasheet view. Alternatively, select the table name and click the Open button on the Database window toolbar.


Examine the table and verify that the record for Alphonse Moore no longer displays. Compare your screen with Figure 3.5 and confirm that the new record you added with your name for Student# 22202 is included.

Figure 3.5.

Recall that this form is based on the Club Members table. Your actions of adding and deleting records using the Club Members form updates the records stored in the Club Members table.


On the title bar of the table, click the Close button to close the table.

Activity 3.4. Printing a Form

Like other Access objects, forms can be printed. If you click the Print button, all of the records will print in the form layout that you selected.


On the Objects bar, click Forms, and notice that the Club Members form you just created is listed. Double-click the Club Members form to open it in Form view, and then click the Maximize button on the Club Members form window. On the Form View toolbar click the Print Preview button . In the navigation area, click the Next Page button .

[Page 1057]
In the Print Preview window, the records display in a form layout in a single column. Two pages are needed to print all of the records and the right half of each page is empty.


On the Print Preview toolbar, click the Close button . From the File menu, display the Page Setup dialog box, and then click the Columns tab.

Here you can change the number of columns, row spacing, column width or height, and the column layout of the printed result.


Under Grid Settings, change the Number of Columns to 2 and the Column Spacing to 0.15" Compare your screen with Figure 3.6, and then click OK.

Figure 3.6.

Use two columns to maximize the number of records that display on a page. The space between the columns is adjusted slightly to ensure that the entire width of the two columns will print.


Click the Print Preview button to see how the form will look in a two-column layout. Compare your screen with Figure 3.7 to verify that all of the records display on one page in a two-column layout. In the navigation area, notice that the Next Page arrow is not active, indicating that all of the records will print on one page.

[Page 1058]

Figure 3.7.

Alert!: Does a Warning Box Display?

Depending on your printer, a warning box may display to advise you that the columns will be too wide and some data may be lost. If this displays, click OK and continue with the print process. The adjustment to the column spacing property should be sufficient to enable all of the data to print.


On the Print Preview toolbar, click the Print button , unless you have been instructed to submit your file electronically. Click Close to close the Print Preview window, and then in the upper right corner, click the small Close Window button to close the form. Because you maximized the Form window, your Database window is now maximized on your screen.

[Page 1058 (continued)]

Windows XP

Outlook 2003

Internet Explorer

Computer Concepts

Word 2003

Chapter One. Creating Documents with Microsoft Word 2003

Chapter Two. Formatting and Organizing Text

Chapter Three. Using Graphics and Tables

Chapter Four. Using Special Document Formats, Columns, and Mail Merge

Excel 2003

Chapter One. Creating a Worksheet and Charting Data

Chapter Two. Designing Effective Worksheets

Chapter Three. Using Functions and Data Tables

Access 2003

Chapter One. Getting Started with Access Databases and Tables

Chapter Two. Sort, Filter, and Query a Database

Chapter Three. Forms and Reports

Powerpoint 2003

Chapter One. Getting Started with PowerPoint 2003

Chapter Two. Creating a Presentation

Chapter Three. Formatting a Presentation

Integrated Projects

Chapter One. Using Access Data with Other Office Applications

Chapter Two. Using Tables in Word and Excel

Chapter Three. Using Excel as a Data Source in a Mail Merge

Chapter Four. Linking Data in Office Documents

Chapter Five. Creating Presentation Content from Office Documents

Go! With Microsoft Office 2003 Brief
GO! with Microsoft Office 2003 Brief (2nd Edition)
ISBN: 0131878646
EAN: 2147483647
Year: 2004
Pages: 448

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net