Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Can't Print Datasheet Gridlines in Color in Access


View products that this article applies to.

This article was previously published under Q207494
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

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

↑ Back to the top


Symptoms

When you set the options for Datasheet view of a table, query, or form on the Datasheet tab of the Options dialog box (Tools|Options), you can change the color of the gridlines. The color that you select is visible on your screen in Datasheet view; however, if you print or preview the Datasheet, all gridlines are black.

↑ Back to the top


Resolution

If you want to print color gridlines in a Datasheet, you can create a report based on the table or query that arranges text box controls to simulate a Datasheet view. Then you can set the properties of the text boxes to display colored outlines that will print on your color printer.

This example demonstrates how to arrange text boxes on a report to simulate a Datasheet view:
1.Open the sample database Northwind.mdb.
2.In the Database window, click Reports under Objects , and then click New.
3.In the New Report dialog box, click AutoReport: Tabular, and then click Shippers in the Choose the table or query where the object's data comes from box. Click OK.
4.As soon as the report is displayed in Print Preview, on the View menu, click Design View.
5.Delete the Line object under the three label controls in the page header section of the report.
6.Click the Shipper ID label control in the page header section, and then hold down the SHIFT key as you click the Company Name and Phone label controls. This selects all three labels at the same time. With all three controls selected, set the following properties, which will affect each of the controls:
   Top: 0"
   BackStyle: Normal
   BackColor: 12632256
   BorderStyle: Solid
   BorderColor: 0
					
7.With all three label controls still selected, on the Format menu, click Horizontal Spacing, and then click Decrease. This decreases the space between the labels. Repeat this step if necessary until there is no space between the controls.
8.Click the ShipperID text box in the detail section, and then hold down the SHIFT key as you click the CompanyName and Phone text boxes. This selects all three text boxes at the same time. With all three controls selected, set the following properties, which will affect each of the controls:
   Top: 0"
   Height: 0.2"
   BorderStyle: Solid
					
9.With all three text box controls still selected, on the Format menu, click Horizontal Spacing, and then click Decrease. This decreases the space between the labels. Repeat this step if necessary until there is no space between the controls.
10.Set the Height property of the detail section to 0.2".
11.On the File menu, click Print Preview. Note that the report simulates a Datasheet view of the Shippers table, and you can see the gridlines in color.

↑ Back to the top


More information

Steps to Reproduce Behavior

1.Open the sample database Northwind.mdb.
2.On the Tools menu, click Options.
3.Click the Datasheet tab in the Options dialog box.
4.In the Gridlines box, set the color to Blue, and then click OK.
5.Open the Shippers table in Datasheet view. Note that blue gridlines appear.
6.On the File menu, click Print Preview.

Note that some or all of the gridlines appear black in Print Preview.
NOTE: If you change the Font or Background colors for the Datasheet, those colors appear correctly when you print or preview the Datasheet.

↑ Back to the top


References

For more information about default options, click Microsoft Access Help on the Help menu, type Customize the Microsoft Access environment by setting defaults in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about customizing gridlines, click Microsoft Access Help on the Help menu, type Change the gridline style and background color in Datasheet view in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB207494, kbusage, kbprb

↑ Back to the top

Article Info
Article ID : 207494
Revision : 2
Created on : 7/13/2004
Published on : 7/13/2004
Exists online : False
Views : 364