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.15 shows the Catalogs table in datasheet view, with the important parts of the datasheet labeled.

Figure 5.15. The parts of a datasheet.

graphics/05fig15.gif

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.

graphics/05fig16.gif

Note

graphics/nman.gif

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.


Tip

graphics/tman.gif

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.


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

Keystroke

Effect

F5

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

Ctrl+;

Inserts the current date.

Ctrl+:

Inserts the current time.

Ctrl+'

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

Ctrl++

Adds a new record to the table

F2

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

Tab

Moves to the next field.

Right arrow

Moves to the next field.

Shift+Tab

Moves to the previous field.

Left arrow

Moves to the previous field.

Home

Moves to the first field.

End

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.

Ctrl+Up Arrow

Moves to the first row in the current field.

Ctrl+Down Arrow

Moves to the last row in the current field.

Ctrl+Home

Moves to the first field in the first record.

Ctrl+End

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.

Shift+F2

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



Absolute Beginner's Guide to Microsoft Office Access 2003
Absolute Beginners Guide to Microsoft Office Access 2003
ISBN: 0789729407
EAN: 2147483647
Year: 2002
Pages: 124

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