Manipulating Table Columns and Rows





Manipulating Table Columns and Rows

When you refine a table's structure by adding fields and changing field properties, you affect the data that is stored in the table. But sometimes you will want to reorganize 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 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 affecting the underlying data in any way. 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 changes without saving them.

In this exercise, you will open a table and manipulate its columns and rows.

USE the 04_Manipulating database. This practice file is located in the Chapter02 subfolder under SBS_Access2007.

OPEN the 04_Manipulating database.


1.
In the Navigation Pane, double-click the Customers table to open it in Datasheet view.

2.
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.

The column is too narrow to display the entire address.

3.
Point to the vertical bar between the Address and City column headers, and when the pointer changes to a double-headed arrow, double-click the vertical bar.

Access resizes the column to the left of the vertical bar to 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.

4.
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.

5.
On the Home tab, in the Records group, click the More button, and then click Row Height.

6.
In the Row Height dialog box, select the Standard Height check box, and then click OK.

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

7.
Click anywhere in the First Name column. In the Records group, click the More button, and then click Hide Columns.

The First Name column disappears, and the columns to its right shift to the left.

Tip

If you select several columns before clicking Hide Columns, they all disappear. You can select adjacent columns by clicking in the header of one, holding down the Shift key, and then clicking in the header of another. The two columns and any columns in between are selected.

8.
To restore the hidden field, in the Records group, click the More button, and then click Unhide Columns.

The Unhide Columns dialog box opens.

9.
In the Unhide Columns dialog box, select the First Name check box, and then click Close.

Access redisplays the First Name column.

10.
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.

11.
Point to the Customer ID column header, hold down the mouse button, and drag through the First Name and Last Name column headers. With the three columns selected, click the More button in the Records group, and then click Freeze.

12.
Scroll the window to the right.

The first three columns remain in view.

13.
In the Records group, click More, and then click Unfreeze to restore the columns to their normal condition.

Tip

The commands to hide, unhide, freeze, or unfreeze columns are available from the shortcut menu that appears when you right-click a column header.

CLOSE the table without saving your changes, and then close the 04_Manipulating database. If you are not continuing directly on to the next chapter, quit Access.




 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows