>>> DO CASE >>> CASE nKeyCode = 18 .AND. nShiftAltCtrl = 0 && Page Up >>> *--TCH 01/11/2006 Issue#3841 Courtesy Gregory Adam UT Thread 1085658 >>> NODEFAULT >>> IF VARTYPE(THISFORM.ACTIVECONTROL) = "O" .AND. !ISNULL(THISFORM.ACTIVECONTROL) .AND. ; >>> PEMSTATUS(THISFORM.ACTIVECONTROL, 'SetFocus', 5) >>> THISFORM.ACTIVECONTROL.SETFOCUS() >>> ENDIF >>>*--Etc >>>>>
>>if( (vartype(m.thisform.ActiveControl) = 'O') and PEMSTATUS(m.thisform.ActiveControl, 'SetFocus', 5) ) >>... >>endif >>>
local ac ac = thisform.GetActiveControl() && which uses type()So, Tracy should use
local ac ac = iif(type('m.thisform.ActiceControl') = T_OBJECT, m.thisform.ActiceControl, null) =iif(!isnull(m.ac) and PEMSTATUS(m.ac, 'SetFocus', 5), m.ac.SetFocus(), .f.)