FindChild method
The FindChild method gets an interface to a child object that is referenced by ID (name). You can use this method when you need to get the interface to a child object for which you only know the name.
If the method references a field and the same ID is used
within multiple page objects, the method returns the first matching
field.
Syntax
- VBScript
oDCO FindChild (lpszName as String ) as Boolean.
- C#
TDCOLib.DCO FindChild(string lpszName)
Arguments
- lpszName
- The ID (name) of the child object.
Returns
Returns an interface to the child object if successful; returns nothing if unsuccessful.Applies to
All objects.VBScript example
This example returns the interface to the Client_ID field, and displays the interface in a message box.Dim objRTClFld
Set objRTClFld=oDCO.FindChild("Client_ID")
msgbox objRTClFld.ID
To retrieve a child object by index
instead of ID, use GetChild methodC# example
This example returns an interface to the Vendor field:m_oDCOField = m_oDCOPage.FindChild("Vendor");