Controls Property (Form, SubForm, Report Object)

Controls Property (Form, SubForm, Report Object)

See Also                  Applies To

You can use the Controls property to reference the Controls collection of a form, subform, report or section.

Setting

The Controls property is available only by using Visual Basic and is read-only.

Remarks

Use the Controls property to refer to one of the controls on a form, subform, report, or section, within another control, or attached to another control. For example, the first code syntax would return the number of controls located on Form1. The second would reference the name of a property within a control.

Forms("Form1").Controls.Count

Forms("Form1").Controls("Textbox1").Properties(5).Name