RowHeight Property

Microsoft Access Visual Basic

RowHeight Property

       

You can use the RowHeight property to specify the height of all rows in Datasheet view. Read/write Integer.

expression.RowHeight

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

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

You can set the RowHeight property in Datasheet view by dragging the lower border of the record selector or by clicking Row Height on the Format menu. When you set the RowHeight property by using the Row Height command, the value is expressed in points.

In Visual Basic, the RowHeight property setting is a Long Integer value that represents the datasheet row height in twips. To specify the default height for the current font, you can set the RowHeight property to True.

Example

This example takes effect in Datasheet view of the open Customers form. It sets the row height to 450 twips and sizes the column to fit the size of the visible text.

Forms![Customers].RowHeight = 450
Forms![Customers]![Address].ColumnWidth = -2