Class Control (Access VBA)

The Control object represents a control on a form, report, or section, within another control, or attached to another control.

The classes Application, Form and Screen. give access to class Control

Methods

Dropdown - You can use the Dropdown method to force the list in the specified combo box to drop down.

Move - Moves the specified object to the coordinates specified by the argument values.

Requery - The Requery method updates the data underlying a specified control that's on the active form by requerying the source of data for the control.

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.

Undo - You can use the Undo method to reset a control or form when its value has been changed.

Properties

BottomPadding gets or sets the amount of space (in inches) between the control and its bottom gridline.

Column you can use the Column property to refer to a specific column or column and row combination in a multiple-column combo box or list box.

Controls returns the Controls collection of a form, subform, report, or section.

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 control.

GridlineStyleBottom gets or sets the bottom gridline style of the specified control.

GridlineStyleLeft gets or sets the left gridline style of the specified control.

GridlineStyleRight gets or sets the right gridline style of the specified control.

GridlineStyleTop gets or sets the top gridline style of the specified control.

GridlineWidthBottom gets or sets the width of the bottom gridline for the specified control.

GridlineWidthLeft gets or sets the width of the left gridline for the specified control.

GridlineWidthRight gets or sets the width of the right gridline for the specified control.

GridlineWidthTop gets or sets the width of the top gridline for the specified control.

HorizontalAnchor gets or sets an AcHorizontalAnchor constant that indicates how the control is anchored horizontally within its layout.

Hyperlink you can use the Hyperlink property to return a reference to a Hyperlink object and to access the properties and methods of a control's hyperlink.

ItemData the ItemData property returns the data in the bound column for the specified row in a combo box or list box.

ItemsSelected you can use the ItemsSelected property to return a read-only reference to the hidden ItemsSelected collection. This hidden collection can be used to access data in the selected rows of a multiselect list box control.

Layout returns the type of layout for the specified control.

LayoutID returns the unique identifier for the layout that contains the specified control.

LeftPadding gets or sets the amount of space (in inches) between the control and its left gridline.

Name you can use the Name property to determine the string expression that identifies the name of an object.

Object you can use the object property in Visual Basic to return a reference to the ActiveX object that is associated with a linked or embedded OLE object in a control. By using this reference, you can access the properties or invoke the methods of the OLE object. Read-only object.

ObjectVerbs you can use the ObjectVerbs property in Visual Basic to determine the list of verbs that an OLE object supports.

OldValue you can use the OldValue property to determine the unedited value of a bound control.

Pages returns a Pages collection that represents the pages in the specified control that supports tabbed pages (for example, a TabControl 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 control and its right gridline.

Selected you can use the Selected property in Visual Basic to determine if an item is selected.

SmartTags returns a SmartTags collection that represents the collection of smart tags that have been added to a control.

TopPadding gets or sets the amount of space (in inches) between the control and its top gridline.

VerticalAnchor gets or sets an AcVerticalAnchor constant that indicates how the specified control is anchored vertically within its layout.

Form - A Form object refers to a particular Microsoft Access form.

Hyperlink - The Hyperlink object represents a hyperlink associated with a control on a form, report, or data access page.

Pages - The Pages collection contains all Page objects in a tab control.

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.

SmartTags - Represents the collection of smart tags for a control on a form, report, or data access page.