Microsoft KB Archive/304459

= How to format and print a table in Access 2002 =

Article ID: 304459

Article Last Modified on 8/11/2004

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q304459



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



For a Microsoft Access 97 version of this article, see 304461.

For a Microsoft Access 2000 version of this article, see 304460.



SUMMARY
This article shows you how to format and print a table from the Microsoft Access user interface.



MORE INFORMATION
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

 Start Microsoft Access. On the Help menu, point to Sample Databases, and then click Northwind Sample Database. In the Database window, click Tables under Objects, and then double-click the Customers table. With the Customers table open in Datasheet view, try any of the following formatting techniques.

NOTE: Any formatting that you apply is applied to all rows and all columns.

Changing the Font  On the Format menu, click Font. In the Font box, select the font, font style, and size that you want.</li> Under Effects, you can choose to underline the text by clicking the check box for Underline. To change the color of the font, click the color that you want in the Color box.</li> A sample of what the text will look like with the changes that you made to the font is shown under Sample.</li> You can change the script by selecting the script from the drop-down list.</li> Click OK to apply the changes.

NOTE: The font is changed for the Column headings as well as for all the data.</li></ol>

Formatting the Cell Effect and Gridlines of the Datasheet

<ol> On the Format menu, click Datasheet.</li> In the Datasheet Formatting dialog box, you can change the effect of the cells to Flat, Raised or Sunken. If you change the Cell Effect to Raised or Sunken, the Gridlines Shown options become unavailable.</li> If you want to print your table without gridlines, click to clear the Horizontal and Vertical check boxes under Gridlines Shown.</li> To change the color of the gridlines and the background, select the color that you want from the list under Gridline Color and Background Color, respectively.</li> You can also change the border and line style by choosing the border and line style that you want from the list.</li> Click OK to apply the changes.</li></ol>

Changing the Row Height

<ol> On the Format menu, click Row Height.</li> In the Row Height dialog box, type the height that you want. The standard height depends on the type and size of the font that you are using.</li> If you modify the row height and you want to bring it back to the standard height, click to select the Standard Height check box.</li> Click OK to apply the changes.</li></ol>

Changing the Column Width

<ol> On the Format menu, click Column Width.</li> <li>In the Column Width dialog box, type the width that you want. The standard width depends on the type and size of the font that you are using. The standard width is the same for all the columns and is based on the first column. If you select Best Fit, each column is sized based on the text for that column.</li> <li>Click OK to apply the changes.

NOTE: If you set the column width to 0, the column is hidden. To bring the column back, follow the steps in &quot;Hiding and Unhiding a Column&quot; section later in this article.</li></ol>

Renaming the Column Headings

<ol> <li>Place the mouse pointer in the column that you want to resize.</li> <li>On the Format menu, click Rename Column.</li> <li>Type the name that you want for the column, and then press ENTER.

'''

NOTE''': When you change a column heading, you are changing the field name and not the caption. The caption is then removed for the field.</li></ol>

Hiding and Unhiding a Column

<ol> <li>Place the mouse pointer in the column that you want to hide.</li> <li>On the Format menu, click Hide Columns.</li> <li>To unhide the column, click Unhide Columns on the Format Menu.</li> <li>In the Unhide Columns dialog box, click the check box for the columns that you want to be visible, and then click Close.</li></ol>

Freezing and Unfreezing Columns

You can freeze one or more columns of a datasheet so that they become the leftmost columns and are visible at all times, no matter where you scroll.

<ol> <li>Place the mouse pointer in the column that you want to freeze.</li> <li>On the Format menu, click Freeze Columns.</li> <li>When you unfreeze columns, all the columns are released at the same time. To do so, click Unfreeze All Columns on the Format Menu.</li></ol>

Changing Subdatasheet Properties

You can use a subdatasheet to view and edit related or joined data in a table, a query, a form, or a subform.

NOTE: In the Customers table, a plus sign (+) signs to the left of the CustomerID field indicates a subdatasheet.

<ol> <li>To view the subdatasheet and to edit the information, point to Subdatasheet on the Format menu, and then click Expand All. This displays the subdatasheet for each record.</li> <li>To hide the subdatasheets, point to Subdatasheet on the Format menu, and then click Collapse All.</li> <li>To view the subdatasheet for one record, click the + sign to the left of the row. To collapse it, click the minus sign (-).</li> <li>To remove the subdatasheet, point to Subdatasheet on the Format menu, and then click Remove.</li> <li>To insert the subdatasheet again, click Subdatasheet on the Insert menu.</li> <li>In the Insert Subdatasheet dialog box, click the Tables tab, and then click the Orders table.</li> <li>Make sure the Link Child Fields and the Link Master Fields boxes are set to CustomerID, and then click OK to insert the subdatasheet.</li></ol> </li></ol>

Printing a Table
To print a table, follow these steps:
 * 1) Open the Customers table in Datasheet view.
 * 2) On the File menu, click Page Setup.
 * 3) In the Page Setup dialog box, click the Margins tab. Note that you can adjust the page margins to increase or decrease the information that is printed on each page.
 * 4) Click the Page tab and note that you can set the Orientation to Portrait or Landscape, depending on how you want to see your information printed.
 * 5) On the File menu, click Print.
 * 6) You can choose to print all pages, selected pages, or selected records, based on the option that you select for Print Range.
 * 7) Click OK to print the table. Note that the table is printed with the formatting options that you have applied.

<div class="references_section">