I added a custom method to my form class called m_setfirst, whenever I want
to set the focus to the 1st control I just issue ThisForm.m_SetFirst
* Method m_SetFirst
*) Sets focus to the control with the earliest TabIndex
LPARAMETER l_ctoWhich
LOCAL l_oCtl, l_oPag
IF PCOUNT() < 1 AND TYPE('l_ctoWhich')= 'L' &&Check for pageframes
l_ctoWhich = ThisForm
ENDIF && Check for pageframes
FOR EACH l_oCtl IN l_ctoWhich.Controls
WITH l_oCtl
IF UPPER(.baseclass) = "PAGEFRAME"
FOR EACH l_oPag IN .Pages
IF l_oPag.PageOrder = .ActivePage
ThisForm.m_SetFirst(l_oPag)
ENDIF
ENDFOR
EXIT
ENDIF
IF .TabIndex = 1
.SetFocus()
EXIT
ENDIF
ENDWITH
ENDFOR