Lesson 7 | Adding and Deleting fields |
Objective | Edit the table design by adding and deleting fields. |
Adding | Deleting fields in MS Access
Even though you have carefully designed your tables you may find that you need to add or remove a field. You also may find that you need to change the order of fields in the datasheet, this is covered in the next lesson.
You can add and remove fields in both the datasheet and Design views.
This simulation shows you two methods for adding a field to a table: using the Datasheet view and using the Design view.
Adding a Field to a Table
- We are going to begin with the Datasheet view. To add a field in Datasheet view, display the table and right-click the column header where
you want to add the new column (the new column will be inserted before the selected column). Right-click the Address column and choose
Insert Column in order to add a column to the left of it. Right-click the Address column and choose Insert Column in order to add a column
to the left of it.
- Access adds a new, blank column to the table. The new field has the name Field1. Rename the field with the name Company using the same method you learned when you created a new table in Datasheet view--just double-click the name, type Company, and press Enter. Now your table has a new field, ready to be filled with data.
- Now your table has a new field, ready to be filled with data. Click the View button on the toolbar to display the Design view and learn
how to add a field there.
-
To add a field in the Design view, right-click anywhere on the address row and select Insert Rows from the shortcut menu. This will add a
row above the address row.
- Access adds a new row to the table design. Use this field to hold the Web site for each client in the Clients table. This field will be a
hyperlink field so that you can click on the Web site address and display the Web site in your Web browser (assuming you have a Web
browser and are connected to the Internet). Name the field Web Site and then click in the Data Type field to assign it the data type
Hyperlink.
- Click on the down arrow to select Hyperlink.
- Now you are done making changes in Design view. To view your changes in the Datasheet view, click the Datasheet view button on the
toolbar.
- After making changes in Design view, you need to save the changes before you can view the datasheet. Select the Yes button on the Save
dialog box.
- When you view the datasheet you will see a blank column before the Address column where you can enter Web site addresses. This is the
end of the simulation. Click the Exit button to return to the lesson.
Deleting Access Table Field
Removing a field from a datasheet is very similar process to adding a field--the only difference is that you right click the field you want to
delete and select Delete Rows (in Design view) or Delete Column (in Datasheet view) from the shortcut menu. When you delete a field, you also delete all the data in the field. Learn how to create hyperlinks in a table.
Adding Deleting Fields - Exercise