Form.DatasheetFontName property (Access)

Use the DatasheetFontName property to specify the font used to display and print field names and data in Datasheet view. Read/write String.

Syntax

expression.DatasheetFontName

expression A variable that represents a Form object.

Remarks

The DatasheetFontName property applies to all fields in Datasheet view and to form controls when the form is in Datasheet view.

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

For the DatasheetFontName property, the font names that you can specify depend on the fonts installed on your system and for your printer. If you specify a font that your system can't display or that isn't installed, Windows will substitute a similar font.

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

Property Property
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 of the database.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.