Class SubForm (Access VBA)
This object corresponds to a subform control. The subform control embeds a form in a form.
Methods
Move - Moves the specified object to the coordinates specified by the argument values.
Requery - The Requery method updates the data underlying a specified subform by requerying the source of data for the subform.
SetFocus - The SetFocus method moves the focus to the specified form, the specified control on the active form, or the specified field on the active datasheet.
SizeToFit - You can use the SizeToFit method to size a control so that it fits the text or image that it contains.
Properties
Controls (Default member) - Returns the Controls collection of a form, subform, report, or section.
AddColon specifies whether a colon follows the text in labels for new controls.
AutoLabel specifies whether labels are automatically created and attached to new controls.
BorderColor you can use the BorderColor property to specify the color of a control's border.
BorderShade gets or sets the shade that is applied to the theme color in the BorderColor property of the specified object.
BorderStyle specifies how a control's border appears.
BorderThemeColorIndex gets or sets a value that represents a color in the applied color theme associated with the BorderColor property of the specified object.
BorderTint gets or sets the tint that is applied to the theme color in the BorderColor property of the specified object.
BorderWidth you can use the BorderWidth property to specify the width of a control's border.
BottomPadding gets or sets the amount of space (in inches) between the subform and its bottom gridline.
CanGrow gets or sets whether the specified control automatically adjusts vertically to print or preview all the data that the control contains.
CanShrink gets or sets whether the specified control automatically adjusts vertically to print or preview all the data that the section or control contains.
ControlType you can use the ControlType property in Visual Basic to determine the type of control on a form or report.
DisplayWhen you can use the DisplayWhen property to specify which of a form's controls you want displayed on screen and in print.
Enabled you can use the Enabled property to set or return the status of the conditional format in the FormatCondition object.
EventProcPrefix gets or sets the prefix portion of an event procedure name.
FilterOnEmptyMaster gets or sets whether all records are displayed when the subform's master field is Null.
Form you can use the Form property to refer to a form or to refer to the form associated with a subformcontrol.
GridlineColor gets or sets the color of the gridline for the specified subform.
GridlineShade gets or sets the shade applied to the theme color in the GridlineColor property of the specified object.
GridlineStyleBottom gets or sets the bottom gridline style of the specified subform.
GridlineStyleLeft gets or sets the left gridline style of the specified subform.
GridlineStyleRight gets or sets the right gridline style of the specified subform.
GridlineStyleTop gets or sets the top gridline style of the specified subform.
GridlineThemeColorIndex gets or sets the theme color index that represents a color in the applied color theme associated with the GridlineColor property of the specified object.
GridlineTint gets or sets the tint applied to the theme color in the GridlineColor property of the specified object.
GridlineWidthBottom gets or sets the width of the bottom gridline for the specified subform.
GridlineWidthLeft gets or sets the width of the left gridline for the specified subform.
GridlineWidthRight gets or sets the width of the right gridline for the specified subform.
GridlineWidthTop gets or sets the width of the top gridline for the specified subform.
Height gets or sets the height of the specified object in twips.
HorizontalAnchor gets or sets an AcHorizontalAnchor constant that indicates how the subform is anchored horizontally within its layout.
InSelection you can use the InSelection property to determine or specify whether a control on a form in Design view is selected.
IsVisible you can use the IsVisible property to determine whether a control on a report is visible.
LabelAlign the LabelAlign property specifies the text alignment within attached labels on new controls.
LabelX the LabelX property (along with the LabelY property) specifies the placement of the label for a new control.
LabelY the LabelY property (along with the LabelX property) specifies the placement of the label for a new control.
Layout returns the type of layout for the specified subform.
LayoutID returns the unique identifier for the layout that contains the specified subform.
Left you can use the Left property to specify an object's location on a form or report.
LeftPadding gets or sets the amount of space (in inches) between the subform and its left gridline.
LinkChildFields you can use the LinkChildFields property (along with the LinkMasterFields property) to specify how Microsoft Access links records in a form or report to records in a subform, subreport, or embedded object, such as a chart. If these properties are set, Access automatically updates the related record in the subform when you change to a new record in a main form.
LinkMasterFields you can use the LinkMasterFields property (along with the LinkChildFields property) to specify how Microsoft Access links records in a form or report to records in a subform, subreport, or embedded object, such as a chart. If these properties are set, Access automatically updates the related record in the subform when you change to a new record in a main form.
Locked the Locked property specifies whether you can edit data in a control in Form view.
Name you can use the Name property to specify or determine the string expression that identifies the name of an object.
OldBorderStyle you can use this property to set or return the unedited value of the BorderStyle property for a form or control. This property is useful if you need to revert to an unedited or preferred border style.
OnEnter sets or returns the value of the On Enter box in the Properties window of specified object.
OnExit sets or returns the value of the On Exit box in the Properties window of specified object.
Properties returns a reference to a control's Properties collection object.
Report you can use the Report property to refer to a report or to refer to the report associated with a subreport control.
RightPadding gets or sets the amount of space (in inches) between the subform and its right gridline.
Section you can identify these controls by the section of a form or report where the control appears.
SourceObject you can use the SourceObject property to identify the form or report that is the source of the subform or subreport on a form or report.
SpecialEffect you can use the SpecialEffect property to specify whether special formatting will apply to the specified object.
StatusBarText you can use the StatusBarText property to specify the text that is displayed in the status bar when a control is selected.
TabIndex you can use the TabIndex property to specify a control's place in the tab order on a form or report.
TabStop you can use the TabStop property to specify whether you can use the Tab key to move the focus to a control.
Tag stores extra information about a form, report, section, or control needed by a Microsoft Access application.
Top you can use the Top property to specify an object's location on a form or report.
TopPadding gets or sets the amount of space (in inches) between the subform and its top gridline.
VerticalAnchor gets or sets an AcVerticalAnchor constant that indicates how the specified subform is anchored vertically within its layout.
Visible returns or sets whether the object is visible.
Width gets or sets the width of the specified object in twips.
Related Classes
Controls - The Controls collection contains all of the controls on a form, report, or subform, within another control, or attached to another control. The Controls collection is a member of the Form, Report, and SubForm objects.
Form - A Form object refers to a particular Microsoft Access form.
Properties - The Properties collection contains all the built-in properties in an instance of an open form, report, or control. These properties uniquely characterize that instance of the object.
Report - A Report object refers to a particular Microsoft Access report.