G.17. The SubForm Object

When designing Access forms, you can embed a subform within your main form. The SubForm object includes the same properties as the Control object. In addition, some of the SubForm object's properties are the same as other Access form objects. As a convenience, however, all of the SubForm object properties are described in the following table.

G.17.1. SubForm Object Properties

PropertyData TypeDescription
AddColonBooleanSpecifies whether a colon follows the text in labels for new controls.
ApplicationApplication objectReturns the currently active application object.
AutoLabelBooleanSpecifies whether labels are automatically created and attached to new controls.
BorderColorLongSpecifies the color of a control's border.
BorderStyleByteSpecifies the type of border and border elements for the form.
BorderWidthByteSpecifies the width of a control's border.
BottomPaddingIntegerSpecifies the amount of space between a control and its bottom gridline.
CanGrowBooleanSpecifies whether the subform can grow to accommodate all the data.
CanShrinkBooleanSpecifies if the subform can shrink to avoid empty space with no data.
ControlsControls collectionReturns the collection of all controls on the subform.
ControlTypeByteSpecifies the type of control on a subform.
DisplayWhenByteSpecifies which of a subform's sections or controls you want displayed on the screen or in print.
EnabledBooleanReturns the status of the conditional format in the FormatCondition object.
EventProcPrefixString ...

Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.