Hi Tim ----
What happens when it doesn't work? Do you get an error message or does nothing happen? Could it be as simple as needing a container Refresh() after the SetFocus()?
I have a form property called FirstObject that I use a lot where I set the value of FirstObject to "THISFORM.pgfMain.Page1.txtLastName" or somesuch and then
cObj=THIS.FirstObject
&cObj..SetFocus()
THIS.Refresh()
Works without problem.
>I am retrieving a string using SYS(1272). This is an objects heirarchy and I would like to SetFocus to it. The problem is it is a string and not an object.
>
>Is there an easy way to derive an object from a string?
>
>Example:
>lcString = "TsMaintForm.PageFrame1.Page1.txtstring"
>
>I would like to Setfocus to it. Have tried
>
>&lcString..SetFocus()
>
>and
>
>lcNewString = lcString + ".SetFocus()"
>&lcNewString
>
>But neither works, any help would be be appreciated.
>
>Thanks, Tim
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05