>>>I have a property which holds the name of an object. From that property value, how can I reference its object?
>>>
>>>For example, a class might have a cControl property. Lets say that cControl=ThisForm.txtFirstName. Now, in a method, I want to reference the value of the ThisForm.txtFirstName property by the use of the cControl property.
>>
>>Simple,
oControl = EVALUATE(ThisForm.cControl)
>>? oControl.Value
>
>This is what I did. I thought I could have referenced it without evaluating.
Well, I think I know what you're going for. With, for example, the Treeview control, you can get an object reference through the key that uniquely defines the node. Something like
oNode = ThisForm.Treeview1.Nodes(ThisForm.cKey)
where ThisForm.cKey holds a string with the key. Unfortunately, the Controls collection can't be similarly referenced. However, if you stored the numeric value as a property of the form you could.
George
Ubi caritas et amor, deus ibi est