Export (0) Print
Expand All

CanGrow Property [Access 2003 VBA Language Reference]

Office 2003

You can use the CanGrow property to control the appearance of sections or controls on forms and reports that are printed or previewed. For example, if you set the property to Yes, a section or control automatically adjusts vertically to print or preview all the data the section or control contains.

Notes

  • The CanGrow property does not apply to a form or report page header and page footer sections, although it does apply to controls in such sections.
  • This property affects the display of form sections and controls only when the form is printed or previewed, not when the form is displayed in Form view, Datasheet view, or Design view.

Read/write Boolean.

expression.CanGrow

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

Setting

The CanGrow property uses the following settings.

Setting Visual Basic Description
Yes True (–1) The section or control grows vertically so that all data it contains can be printed or previewed.
No False (0) (Default) The section or control doesn't grow. Data that doesn't fit within the fixed size of the section or control won't be printed or previewed.

Note  You can set this property only by using the section or control's property sheet .

For controls, you can set the default for these properties by using the default control style or the DefaultControl property in Visual Basic.

This property setting is read-only in a macro or Visual Basic in any view but Design view.

Remarks

You can use this property to control the appearance of printed forms and reports. When you set the property to Yes, the object automatically adjusts so any amount of data can be printed. When a control grows, the controls below it move down the page.

If you set a control's CanGrow property to Yes, Microsoft Access automatically sets the CanGrow property of the section containing the control to Yes.

Sections grow vertically across their entire width. To grow the data independently, you can place two subform or subreport controls side by side, and set their CanGrow property to Yes.

When you use the CanGrow property, remember that:

  • The property settings don't affect the horizontal spacing between controls; they affect only the vertical space the controls occupy.
  • Overlapping controls can't grow.




Show:
© 2015 Microsoft