DatasheetGridlinesColor Property

DatasheetGridlinesColor Property

See Also                  Applies To

You can use the DatasheetGridlinesColor property to specify the color of gridlines in a datasheet.

Notes   The DatasheetGridlinesColor property applies only to objects in Datasheet view.

This property is only available in Visual Basic within a Microsoft Access database (.mdb).

Setting

The DatasheetGridlinesColor property setting is a Long Integer value. In Visual Basic, you can also use the RGB or QBColor functions to set this property.

You can set this property by using Line Color on the Formatting (Datasheet) toolbar, in an Access database (.mdb), you can add the property by using a macro, or by using Visual Basic.

The following setting information applies to both Access databases (.mdb) and Access projects (.adp):

You can also set this property by clicking Cells on the Format menu and displaying the Cells Effects dialog box. You can then select an available color from the drop-down list under Gridline color.

You can set the default DatasheetGridlinesColor property by using the settings under Default Colors on the Datasheet tab of the Options dialog box, available by clicking Options on the Tools menu.

Remarks

This property setting affects the gridline color for the entire datasheet. It's not possible to set the gridline color of individual cells in Datasheet view.

The following table contains the properties that don't exist in the DAO Properties collection of until you set them by using the Formatting (Datasheet) toolbar or you can add them in an Access database (.mdb) by using the CreateProperty method and append it to the DAO Properties collection.

DatasheetFontItalic* DatasheetForeColor*
DatasheetFontHeight* DatasheetBackColor
DatasheetFontName* DatasheetGridlinesColor
DatasheetFontUnderline* DatasheetGridlinesBehavior
DatasheetFontWeight* DatasheetCellsEffect

Note   When you add or set any property listed with an asterisk, Microsoft Access automatically adds all the properties listed with an asterisk to the Properties collection in the database.