
- •7 Work with package ms Office: ms Access
- •Database Basics
- •Database Tables
- •Records and Fields
- •Using a Key Field
- •Looking at Access
- •Creating a Database
- •Understanding Database Objects
- •To Do: Create a Table
- •Setting Field Properties
- •Setting the Key and Saving the Table
- •Modifying Table Structures
- •Viewing Table Design and Entering Simple Data
- •Summary
Viewing Table Design and Entering Simple Data
Until now, you have worked exclusively in the Design view of the table, which describes the table's fields, properties, and key. From the Database window, if you double-click a table name (or select the table and click the Open button), Access displays your table with the Datasheet view, the view shown in Figure 17.8. Unlike the Design view, the Datasheet view enables you to enter and edit data in the table. For a new table, only one table row appears and it's blank because the table has no data. If the table contained data, you would see rows from the table with data. Unlike the Design view, you cannot change the table's structure from the Datasheet view.
Figure 17.8 Use the Datasheet view to enter data into your table.
Note
You can easily switch from Datasheet view and Design view by clicking the Access toolbar's View button. As you design a table and add the table's initial data, the two views help you pinpoint design and data problems.
The Datasheet view enables you to work with your table in row and column format, similar to an Excel worksheet. Until you enter data in the table, the Datasheet view shows only one empty record, but as you add to the table, the Datasheet view grows to resemble an Excel worksheet with cells that represent each table's field.
Although Access offers several ways to enter data into a table, the Datasheet view is the fastest and simplest if you understand records and fields. The Datasheet view is not fancy, however, and some users need more help when entering data. If you build a database application for a video store's inventory, for example, the clerk should not be adjusting the inventory table directly within the Datasheet view when a customer rents a tape. You learn in Hour 18, "Entering and Displaying Access 2003 Data," how to design data-entry forms that walk the user through the data-entry process for specific scenarios so that the user does not inadvertently change information in the wrong record.
Although the Datasheet view is not fancy, it enables you to quickly see your table's design results and to enter data. If you cannot read a full field name, drag the field separator left or right to increase or decrease the field width shown on the screen.
Note
Most of the Database window objects offer two views: a Design view and another view that displays the final object, such as the table's Datasheet view and the form's Form view.
You can design a table from the Datasheet view, but you make more work for yourself if you do. The default Datasheet view field names are Field1, Field2, and so on until you right-click the names and change them. You cannot set specific field properties from the Datasheet view because Access assumes that all fields are text. In addition, you cannot specify a primary key field in the Datasheet view. Use the Datasheet view for simple data entry and for testing your table's design. Skip the Design view phase only if you want to create an extremely simple, all-text table.
So that you can practice manipulating a database and all its objects, Access comes with a comprehensive database called theNorthwind Traders, Inc., Database, which you can study to learn about advanced database operations. Use File, Open and locate the database in your Office 2003 folder to open and work with the sample database.
Note
Always quit Access and shut down Windows before turning off your computer; otherwise, you might lose data that didn't get saved in your database tables.