ISProfileForm.Controls_

Description

This property allows access to any child control by its name or index.

Syntax

object.Controls_(aControlNameOrIndex)

Part Attribute Type Description
object Required
The object always implements the ISProfileForm interface
aControlNameOrIndex In, Required
object
The name or index of the control
Restriction: This property is readonly.

Return Value

ISControl

Example

Display some information about the controls of the form with the specified name or index.

Dim aControl
Dim aControlInfo

'Access to the child controls through their index  
i = 0
do
  Set aControl = Form.Controls_(CInt(i))

  if not aControl is nothing then
    aControlInfo = aControlInfo & vbNewLine & "------" & vbNewLine &_
      "ShortName: " & aControl.ShortName & vbNewLine &_
      "TypeName: " & aControl.TypeName      
  end if
  
   i = i + 1
loop until aControl is nothing      

'Access to the child control through its name

Set aControl = Form.Controls_("Button1") 
 
aControlInfo = aControlInfo & vbNewLine & "------ Button1 -------" & vbNewLine &_
  "Caption: " & aControl.Caption & vbNewLine &_ 
  "ShortName: " & aControl.ShortName & vbNewLine &_
  "TypeName: " & aControl.TypeName     
 
Profile.MsgBox(aControlInfo)  
Note: This macro should be executed in any event handler of the form control.

In Profile Client v8 on User Interface Controls can be found in Maintain > Templates > Health Record Collection Templates > Open the selected form template > Open form editor > Object Inspector.

Version information

Added in v7.8.0