CreateReportControl Method

Microsoft Office Access 2003

CreateControl method.

expression.CreateReportControl(ReportName, ControlType, Section, Parent, ColumnName, Left, Top, Width, Height)

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

ReportName   Required String. A string expression identifying the name of the open report on which you want to create the control.

ControlType   Required AcControlType . The type of control you want to create.

AcControlType can be one of these AcControlType constants.
acBoundObjectFrame
acCheckBox
acComboBox
acCommandButton
acCustomControl
acImage
acLabel
acLine
acListBox
acObjectFrame
acOptionButton
acOptionGroup
acPage
acPageBreak
acRectangle
acSubform
acTabCtl
acTextBox
acToggleButton

Section   Optional AcSection . The section that will contain the new control.

AcSection can be one of these AcSection constants.
acDetail default
acFooter
acGroupLevel1Footer
acGroupLevel1Header
acGroupLevel2Footer
acGroupLevel2Header
acHeader
acPageFooter
acPageHeader

Parent   Optional Variant. A string expression identifying the name of the parent control of an attached control. For controls that have no parent control, use a zero-length string for this argument, or omit it.

ColumnName   Optional Variant. The name of the field to which the control will be bound, if it is to be a data-bound control.

Left, Top   Optional Variant. Numeric expressions indicating the coordinates for the upper-left corner of the control in twips.

Width, Height   Optional Variant. Numeric expressions indicating the width and height of the control in twips.