SubdatasheetHeight Property [Access 2003 VBA Language Reference]
You can use the SubdatasheetHeight property to specify or determine the display height of a subdatasheet when expanded. Read/write Integer.
expression Required. An expression that returns one of the objects in the Applies To list.
The SubdatasheetHeight property in a numeric expression representing the default height to display in the subdatasheet.
The easiest way to set the SubdatasheetHeight property is by using a table's property sheet. You can set this property by using Visual Basic . In Visual Basic, the property's value is expressed in twips.
To set the SubdatasheetHeight property by using Visual Basic, you must first either:
Set the property in table Design view by pointing to Properties on the View menu.
Create the property by using the DAO CreateProperty method.
If the subdatasheet includes more records than the height setting can accommodate, a vertical scrollbar is displayed.
The SubdatasheetHeight property setting includes the New Record row if adding new records is supported. It does not include the column header row or scrollbar region.
The SubdatasheetHeight and SubdatasheetExpanded properties take effect on the subform control when the form is in datasheet view.
The following example resizes the height of the subdatasheet in the "Purchase Orders" form (containing a subform) to show only one line of the subdatasheet at a time (measured at about 400 twips), accompanied by a vertical scrollbar. The number 400 is arbitrary, and will vary based on monitor resolution and default font size. This behavior can only be seen in Datasheet View.
Forms("Purchase Orders").SubdatasheetHeight = 400
Applies to | Form Object
See Also | SubdatasheetExpanded Property