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.
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.15 shows the Catalogs table in datasheet view, with the important parts of the datasheet labeled.
Figure 5.15. 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 the new 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.
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.
You can select Format, Datasheet to dress up your datasheets even more. This opens the Datasheet Formatting dialog box shown in Figure 5.16. 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.16. 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