ON KEY LABEL F12 _SCREEN.ACTIVEFORM.OpenFlexiTableForm()This is not a good idea. You would be better off to set the form's KeyPreviewProperty to .T. and write code in the form's KeyPress to handle this. The reason is that OKLs interrupt whatever code happens to be running at the time to do their thing. This may lead to some unexpected behavior.
I got the name of the text box okay, but when fired from the grid containing the text box I got only the grid's as name as the active control.IF TYPE( '_Screen.Activeform.ActiveControl.Name' ) = 'C'
loActiveControl = _Screen.Activeform.ActiveControl
IF UPPER( loActiveControl.BaseClass ) = 'GRID'
FOR EACH loColumn IN loActiveControl.Columns
IF loActiveControl.ActiveColumn = loColumn.ColumnOrder
loActiveControl = EVAL( 'loColumn.'+ loColumn.CurrentControl )
EXIT
ENDIF
ENDFOR
ENDIF
ENDIF