John ---
In my default form class, I have a property called FirstControl. I put the whole object heirarchy there at design-time (such as THISFORM.txtFirstName). In the Init of the Form class, I have
IF !EMPTY(THIS.FirstControl)
cControl=THIS.FirstControl
&cControl..SetFocus()
THIS.Refresh()
ENDIF
Works like a champ.
> How could I setfocus to 1st control in my form? I tried to use myform.controls(1).setfocus, but it still stay in the control focused previously...
>
>Thank you
------------------------------------------------
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