What are two table views available in Access? How can you switch between them?
Table view is a way of looking at the table. MS Access provides two table views that are design view and datasheet view.
1. Datasheet View
The table view that is used to design the structure of a table is called design view. It is used to specify name, data types and description of fields. Primary key is also specified in this view the structure of an existing table can also be changed in design view.
2. Datasheet View
The table view that is used to enter, delete or modify data in a table is called datasheet view. The table in this view is displayed in rows and columns. The name of each field is displayed at the top of the column as header. Each row contains a complete record. The table or query is opened in datasheet view to perform different operations on data in the table. These operations include adding, deleting, updating and searching data etc.
Switching between Views
Following procedure is used to switch between table views:
- Click on View menu.
- Select Datasheet View or Design View from the menu. The table will be displayed according to the selected view option.
Figure 6.4: Tables views
Explain the procedure for creating table in Access.
A table is created in a database. The option Create table in Design view is the most common way of creating a table. Different methods of creating a table are as follows:
- Creating table in Design view
- Creating table by wizard
- Creating table by entering data
Creating Table in Design View
The Design View is used to define the fields of a table. The window is divided into two parts. The following procedure is used to create a table in design view:
- Create new blank database.
- Double click create table in design view. The Design View will appear as follows.
- Type the name of the first field in Field Name column.
- Press tab key to move to Data Type column. Select required data type for the field.
- Press Tab key to move to Description column. It is used to enter comments about the field. This is optional.
- Press Tab key to move to the Field Name for the next field.
- Repeat the above steps for entering any number of fields in the table.
Setting Primary Key
The following procedure is used to create a table in design view:
- Select the field for primary key.
- Click Primary Key on Table Design toolbar. OR select Edit > Primary Key. The row that is chosen as primary key is marked with small symbol in selector button.
Saving a Table
The following steps are performed to save a table.
- Click Save on Table Design toolbar. OR select File > Save. The Save As dialogue box will appear.
- Enter a table name and click OK. The table will be saved. The new table will appear in the database window.