2007 MicrosoftВ® Office System Inside Out (Bpg-Inside Out)
If you’ve been following along to this point, you should still have your new Kathy’s Wedding List database open with Table1 open in Datasheet view, as shown in Figure 27–8. (You can also follow these steps in any open database.) What you see is an empty datasheet, which looks quite similar to a spreadsheet. Access 2007 automatically created the first field, called ID, in the left column. Leave this field intact for now. In the second column Access has placed another field with the Add New Field heading. You can enter just about any type of data you want in this field-text, dates, numbers, or currency. But unlike a spreadsheet, you can’t enter any calculated expressions in a datasheet. As you’ll see later in the chapters about queries, you can easily display a calculated result using data from one or more tables by entering an expression in a query.
Because we’re starting a list of wedding invitees, we’ll need columns containing information such as title, last name, first name, middle initial, street address, city, state, postal code, number of guests invited, number of guests confirmed, gift received, and a gift acknowledged indicator. Be sure to enter the same type of data in a particular column for every row. For example, enter the city name in the seventh column (named Field6 by Access) for every row.
You can see some of the data entered for the wedding invitee list in Figure 27–9. When you start to type in a field in a row, Access 2007 displays a pencil icon on the row selector at the far left to indicate that you’re adding or changing data in that row. Press the Tab key to move from column to column. When you move to another row, Access 2007 saves what you typed. If you make a mistake in a particular row or column, you can click the data you want to change and type over it or delete it. Notice that after you enter data in a column, Access 2007 guesses the most appropriate data type and displays it in the Data Type box on the Datasheet tab on the Ribbon.
If you create a column of data that you don’t want, click anywhere in the column and click Delete in the Fields & Columns group of the Datasheet contextual tab on the Ribbon. Click Yes when Access asks you to confirm the deletion. If you want to insert a blank column between two columns that already contain data, click any where in the column to the right of where you want to insert the new column and then click Insert in the Fields & Columns group of the Datasheet tab on the Ribbon. To move a column to a different location, click the field name at the top of the column to select the entire column, and then click again and drag the column to a new location. You can also click an unselected column and drag your mouse pointer through several adjacent columns to select them all. You can then move the columns as a group.
You probably noticed that Access 2007 named your columns Field1, Field2, and so forth-not very informative. You can enter a name for each column by double-clicking the column’s field name. You can also click anywhere in the column and then click Rename in the Fields & Columns group on the Datasheet tab. In Figure 27–10, we have already renamed one of the columns and are in the process of renaming the second one.
Категории