Working with Records


In this topic, you will add some information to the Employees table. Each record in this table will contain information about one customer. In Access, you can enter and edit records either directly in the table or in a form. Here, we ll use both methods .

Information about  

Creating and customizing forms, page 243

start sidebar
Closing databases

Other Office programs display a warning that you will lose any unsaved changes if you try to close a document without saving it first. However, with Access , you must name and save a database before you can work with it, and it either automatically saves any changes you make or requires you to save them before you can move to another area of the database. As a result, when you are ready to close your database, there is typically nothing to save. All you need to do is click the database s Close button to close the database.

end sidebar
 

Creating a Record

To enter records in a table, you work in Datasheet view, which displays as many records as will fit on the screen in column/row format. Follow these steps to add three new records to the Employees table:

  1. With the Employees table open in Datasheet view and the arrow in the record selector (the gray box at the left end of the first row) indicating that the first record is ready to receive data, type 2 as the first employee ID number.

    Your table should look like the one shown in this graphic:

    click to expand

    Access has added a second record with an asterisk in its row selector, indicating that the new record is empty. Meanwhile, the arrow in the row selector of the first record has changed to a pencil, indicating that the data in the record has been changed but not yet saved. Why isn t it saved? Because the record containing the insertion point is still active, and Access won t save its information until you move to another record.

  2. Press Enter to move to the next field.

  3. Enter these values in the next seven fields of the first record, pressing Enter to move from field to field.

    Field

    Record 1

    Social Security Number

    999294473 (Access inserts the hyphens)

    First Name

    Carol

    Last Name

    Talbot

    Address

    1109 Emerson Way

    City

    Lakewood

    Postal Code

    98403 (Access adds a hyphen)

    Home Phone

    5550125

    Enter the Social Security number without the usual dashes. (You will see how Access handles dashes and parentheses later in this chapter.) Don t worry that the data in the Address field doesn t fit in its column; you ll fix that in a minute.

  4. In the Date Hired field, type 082779 , and press Enter .

    Access inserts slashes in the date.

  5. Enter records 2 through 5 as follows :

    Field

    Record 2

    Record 3

    Record 4

    Record 5

    Employee ID

    19

    27

    29

    33

    Social Security Number

    999129111

    999722249

    999218635

    999021253

    First Name

    Ronda

    Fred

    James

    Lance

    Last Name

    Westerman

    Anderson

    Murray

    Bright

    Address

    1419 Ivy Drive

    943 Spruce Circle

    7921 Port Avenue

    148 Center St,# B211

    City

    Pinedale

    Lakewood

    Lakewood

    Pinedale

    Postal Code

    98412

    98403

    98403

    98412

    Home Phone

    5550126

    5550179

    5550134

    5550183

    Date Hired

    090885

    021489

    032291

    062391

    The Employees table now looks like the one shown in this graphic:

    click to expand
start sidebar
Fast navigation

When you are entering and editing data, using the keyboard to move around a window is often faster than using the mouse. You can easily navigate using the Arrow, Tab, Home, End, Page Up, and Page Down keys.

end sidebar
 

Entering a Record in a Form

Instead of entering information in a table, you can enter it in a form, which displays just one record at a time. Let s display a form for the Employees table and to see how easy it is to enter records in a form. Follow these steps:

  1. Click the New Object button.

    Access displays the form shown in this graphic:

    click to expand
  2. Click the Next Record button at the bottom of the Form window to display the information for Ronda Westerman.

  3. Click the Last Record button to move to the last record, and then click the New Record button to display a blank record.

  4. Enter the sixth record as show in the table on the next page. After typing the last field value, press Enter to display a new blank record, enter the seventh record, and then press Enter .

    Field

    Record 6

    Record 7

    Employee ID

    34

    35

    Social Security Number

    999116309

    999522624

    First Name

    Richard

    Linda

    Last Name

    Talbot

    Gardner

    Address

    1109 Emerson Way

    8841 Market Street

    City

    Lakewood

    Lakewood

    Postal Code

    98403

    98403

    Home Phone

    5550125

    5550154

    Date Hired

    060493

    050294

    The table is complete for now.

  5. Click the Close button to close the form and return to Datasheet view, clicking No when asked if you want to save the design of the form.

    The records are already saved because Access automatically saved each record when you moved to another one.

  6. Update the table by clicking Remove Filter/Sort on the Records menu.

    Access updates the table to show the last two records. Whenever you add records to a table using a form, you won t see the added records until you update the table using this command.

Information about  

Filters, page 278

Sizing a Column

To see all the information in a table, you might have to enlarge the Table window or adjust the sizes of fields. Perhaps you ve noticed that as you move your mouse around the screen, the pointer sometimes changes shape. On the frame of a window, on the gridlines between the field names , and on the dividing lines between the record selectors, the pointer changes to various kinds of double-headed arrows. While the pointer has this shape, you can size the window or the fields. You can size just one column in a table, or more than one simultaneously . Let s adjust the widths of a few fields now. Follow these steps:

  1. Double-click the gridline between the Address and City field names.

    The Address column widens to fit the longest entry. (You could also click anywhere in the column, click Column Width on the Format menu, and then click the Best Fit button.)

  2. Using the same procedure, adjust the widths of the columns for the First Name and Last Name fields.

  3. Move the pointer to the gridline between the City and Postal Code fields. When the pointer changes to a doubleheaded arrow, hold down the left mouse button and drag to the right. When the line attached to the pointer is about where you want the City field s border to be, release the mouse button.

  4. Point to the Postal Code field name. When the pointer changes to a downward-pointing arrow, click to select that field in all records. Then point to the Date Hired field name, hold down the Shift key, and click to add the last two fields to the selection.

    You might have to use the horizontal scroll bar to view the Date Hired field.

  5. Click Column Width on the Format menu.

    The Column Width dialog box shown in this graphic appears:

  6. Type 15 , and press Enter to change the widths of all three fields.

Deleting a Record

To delete a record, you select the record and then press the Delete key, click the Delete Record button, or click Delete on the Edit menu. Follow these steps to delete a record from the Employees table:

  1. Select the record for James Murray by clicking its record selector, and then click the Delete Record button on the toolbar.

    Access displays the warning shown in this graphic:

    click to expand
  2. Click Yes .

    Access deletes the record and updates the table.

  3. Close the Employees table, saving the changes you made earlier to the column widths.




Online Traning Solutions - Quick Course in Microsoft Office XP
Online Traning Solutions - Quick Course in Microsoft Office XP
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 116

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