Deleting Fields


Removing unwanted fields is easy. With the Table window open in Design view, select the field that you want to delete by clicking the row selector. You can extend the selection to multiple contiguous fields by holding down the Shift key and pressing the Up and Down Arrow keys to select multiple rows. You can also select multiple contiguous rows by clicking the row selector of the first row and, without releasing the mouse button, dragging up or down to select all the rows you want. After you select the appropriate fields, click Delete Rows in the Tools group of the Design tab below Table Tools on the Ribbon. Or, press the Delete key to delete the selected fields.

We have one extra field in our current Contacts table that we do not need-the Company field that was created by the table template. (Remember that in Chapter 4, you created a Company Contacts table to link contacts to their respective companies.) To delete this field, click the row selector next to the Company field and then click the Delete Rows button in the Tools group of the Design tab on the Ribbon. Your Contacts table now matches the tblContacts table from the Conrad Systems Contacts database in terms of the correct number of fields and field names. Save these latest changes to the Contacts table by clicking the Save button on the Quick Access Toolbar.

If a table contains one or more rows of data, Access displays a warning message when you delete field definitions in Design view, as shown in Figure 5–20. Click No if you think you made a mistake. Click Yes to proceed with the deletion of the fields and the data in those fields. Keep in mind that you can still undo this change up to the point that you save the table.

image from book
Figure 5–20: This dialog box asks you to confirm a field deletion.

If you want to test this out in the sample table you have been building, make sure you have saved your latest changes and then switch to Datasheet view by clicking the small arrow below the View button in the Views group on the Home tab and then clicking Datasheet View. Type your name in the Last Name and First Name fields and switch back to Design view by clicking the small arrow below the View button again. Try deleting any field in the design, and Access will warn you that you may be deleting some data as well.




Microsoft Office Access 2007 Inside Out
MicrosoftВ® Office Access(TM) 2007 Inside Out (Microsoft Office Access Inside Out)
ISBN: 0735623252
EAN: 2147483647
Year: 2007
Pages: 234

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