Manipulating Table Columns and Rows

Manipulating Table Columns and Rows

When you refine a table’s structure by adding fields and changing field properties in Design view, you are affecting the data that is stored in the table. But sometimes you will want to adjust the table itself to get a better view of the data. If you want to look up a phone number, for example, but the names and phone numbers are several columns apart, you will have to scroll the table window to get the information you need. You might want to rearrange columns or hide a few columns to be able to see the fields you are interested in at the same time.

You can manipulate the columns and rows of an Access table without in any way affecting the underlying data. You can size both rows and columns, and you can also hide, move, and freeze columns. You can save your table formatting so that the table will look the same the next time you open it, or you can discard your table adjustments without saving them.

In this exercise, you will open a table and manipulate its columns and rows. To make the value of table formatting more apparent, you will work with a version of the GardenCo database that has several tables containing many records.

USE the GardenCo database in the practice file folder for this topic. This practice file is located in the My DocumentsMicrosoft PressAccess 2003 SBSCreateNewManipulate folder and can also be accessed by clicking Start/All Programs/Microsoft Press/Access 2003 Step by Step.

OPEN the GardenCo database and acknowledge the safety warning, if necessary.

  1. On the Objects bar, click Tables.

  2. Double-click the Customers table to open it in Datasheet view.

  3. Drag the vertical bar at the right edge of the Address column header to the left until the column is about a half inch wide.

    Manipulating Table Columns and Rows

    The column is too narrow to display the entire address.

  4. Point to the vertical bar between the Address and City column headers, and double-click.

    The column to the left of the vertical bar is the minimum width that will display all the text in that field in all records. This technique is particularly useful in a large table where you can’t easily determine the length of a field’s longest entry.

  5. On the left side of the datasheet, drag the horizontal bar between any two record selectors downward to increase the height of all rows in the table.

    Manipulating Table Columns and Rows
  6. On the Format menu, click Row Height to display the Row Height dialog box.

  7. Select the Standard Height check box, and then click OK.

    The height of all rows is returned to the default setting. (You can also set the rows to any other height in this dialog box.)

  8. Click in the First Name column, and then on the Format menu, click Hide Columns.

    The First Name column disappears, and the columns to its right shift to the left. If you select several columns before clicking Hide Columns, they all disappear.

    Tip

    You can select adjacent columns by clicking in the header of one, holding down the key, and then clicking in the header of another. The two columns and any columns in between are selected.

  9. To restore the hidden field, on the Format menu, click Unhide Columns to display the Unhide Columns dialog box.

    Tip
  10. Select the First Name check box, and then click Close.

    Access redisplays the First Name column.

  11. Drag the right side of the database window to the left to reduce its size so that you cannot see all fields in the table.

  12. Point to the Customer ID column header, hold down the mouse button, and drag through the First Name and Last Name column headers. Then with the three columns selected, on the Format menu, click Freeze Columns.

    The first three columns will remain in view when you scroll the window horizontally to view columns that are off the screen to the right.

  13. On the Format menu, click Unfreeze All Columns to restore the columns to their normal condition.

  14. Close the table without saving your changes.

CLOSE the GardenCo database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset