>> My problem is that I am unable to determine the active control, given that it may be on a form, a page on a page frame or in a nested container object. <<
The only time that this is a problem is if the activeControl is a cell in a grid. Try something like:
IFTYPE('_Screen.ActiveForm.ActiveControl.Name') = 'C'IFUPPER(_Screen.ActiveForm.ActiveControl.BaseClass) = 'GRID' *** Drill down into the grid for the active cellELSE_Screen.ActiveForm.ActiveControl.SetFocus()
ENDIFENDIF