Working with Data in Your Tables

Now that you know about designing and creating tables, it's time to think about using data in these tables. In this section you'll learn how to enter data in tables, how to move around in a table datasheet, and how to use the AutoCorrect functionality that's built into all the Microsoft Office products.

Using Datasheets

Access supplies multiple views of each object that you can find in the Database window. In the case of tables, you've already seen both views. Design view is useful when you want to manipulate the structure of a table: its fields or its primary key, for example. But to actually work with data, you need to use the other view of a table, datasheet view.

You've already seen datasheet view in this chapter several times, beginning with the steps where you created the Types table. Now it's time to look at a datasheet in more detail. Figure 5.12 shows the Catalogs table in datasheet view, with the important parts of the datasheet labeled.

Figure 5.12. The parts of a datasheet.


To open a table in datasheet view, just double-click the table in the Database window. Alternatively, you can click the table once and then click the Open button, or right-click the table and select Open from its shortcut menu.

To enter or edit data in a datasheet, just click in the cell you want to change and type the value. You can press the Insert key on your keyboard to toggle between inserting new characters and overwriting the characters that are already there.

If you make a mistake typing, don't panic! You can press Ctrl+Z (hold down the Control key on the keyboard and press Z) or Esc to undo your most recent change. You can also press Ctrl+Z twice to undo all the changes you've made to the current record. Access doesn't save changes until you move to another row in the datasheet.

To add a new record to the table, click in the row marked with the asterisk, which is called the new record indicator . Then type the values you want to save in the new record. Click in any other row of the table to save your data. You can also save your data by pressing Shift+Enter or by selecting Records, and then Save Record.

You can use the buttons in the navigation bar area at the bottom of the datasheet to move between records in the table. These buttons offer quick access to the first record, the previous record (the one just before the current record), the next record (the one just after the current record), the last record, and the new record row. You can also click in the current record box and type a number to move directly to that row of the table.



When you resize a column, it affects only that column. When you resize a row, the new size applies to all the rows in the table.

Access also allows you considerable latitude to customize a datasheet. For example, you can click and hold the mouse on the vertical line between field names at the top of the table and drag it from side to side to resize the columns . Similarly, you can click and drag on the horizontal line between records in the record indicator area to resize the rows of the datasheet.

You can even rearrange the columns in the datasheet. Click the column header (the area with the field name ) and drag it to a new location. Then release the mouse to put the column in that location.



Any changes you make to the format of a datasheet apply only to that datasheet. If you make any changes, Access asks you whether to save those changes.

You can select Format, Datasheet to dress up your datasheets even more. This opens the Datasheet Formatting dialog box shown in Figure 5.13. Here you can choose to apply a 3D effect to the cells in the datasheet; decide whether to show gridlines; and select the background color, gridline color , and border styles. You can also choose whether text in the datasheet should read right-to-left instead of left-to-right ( generally this is useful only for languages such as Arabic or Hebrew).

Figure 5.13. Formatting the look of a datasheet.


Datasheet Navigation Tips

Access supports a rich set of keystrokes for working in a datasheet. Table 5.2 shows you some of the ways you can work with a datasheet from the keyboard. You probably won't memorize all these shortcuts unless you're doing lots of data entry, but it's good to know they are available.

Table 5.2. Datasheet Keyboard Shortcuts




Moves to the record number box to allow you to easily jump to an arbitrary record.


Inserts the current date.


Inserts the current time.


Copies the value in the current field from the previous record.


Adds a new record to the table.


Switches between edit mode and navigation mode. Keystrokes for moving between fields and records work only in navigation mode.


Moves to the next field.

Right arrow

Moves to the next field.


Moves to the previous field.

Left arrow

Moves to the previous field.


Moves to the first field.


Moves to the last field.

Down arrow

Moves to the current field in the next record.

Up arrow

Moves to the current field in the previous record.


Moves to the first field in the first record.


Moves to the last field in the last record.

Page Down

Scrolls down one screen of records.

Page Up

Scrolls up one screen of records.


Opens the Zoom box, which allows you to edit the current field in a more spacious area.

Using and Customizing AutoCorrect

Access also supports AutoCorrect, which helps correct typing mistakes as you make them. For example, open the Catalogs table and type Teh Seed Company in the Name field in the new record row at the end of the datasheet. As soon as you type the space after Teh , it automatically is corrected to The . That's AutoCorrect in action.

AutoCorrect in Access works in datasheets and forms, so it's consistent across the entire product. If you want, you can customize the list of corrections the product makes for you. Select Tools , AutoCorrect Options to open the dialog box shown in Figure 5.14.

Figure 5.14. The AutoCorrect dialog box.


As you can see in Figure 5.14, the AutoCorrect dialog box enables you to turn on or off some specific AutoCorrect behaviors, such as automatic capitalization at the start of a sentence or automatic capitalization of day names. At the bottom of the dialog box is a long list of replacements (this is where it knows that teh should be the ). You can remove any one of these replacements you find troublesome by selecting it in the list and clicking Delete. You can also add a new replacement by typing the bad text and the good text at the top of the list and then clicking Add. Click OK when you're done making AutoCorrect changes. Chapter 16, "Sharing Data," contains more information on customizing the AutoCorrect options.



Your AutoCorrect settings are shared across all the Microsoft Office products, so any customizations you make here apply to Word and Excel as well as to Access.

Absolute Beginner's Guide to MicrosoftR Access 2002
Absolute Beginner's Guide to MicrosoftR Access 2002
Year: 2002
Pages: 133 © 2008-2017.
If you may any questions please contact us: