A little word of caution: don't forget to check to existance of ActiveControl by checking type('thisform.myPageFrame.ActivePage.ActiveControl.name') = 'C'
because there could be situations with no ActiveControl.
>Thanks Kurt. That'll work.
>
>>Check the .ActivePage for a pageframe and .ActiveControl properties for a page. It is also a good habit to use PEMSTATUS() when you are referencing properties indirectly to ensure that they really property exist.
>>
>>Should be something like:
>>
>>IF PEMSTATUS(frmMain.tabs1.ActivePage.ActiveControl,'someproperty',5)
>> myvalue = frmMain.tabs1.ActivePage.ActiveControl.someproperty
>>ELSE
>> **** Error ****
>>ENDIF
>>
>>
>>Hope this helps.
>>Kurt
>>
>>>Is there an easy way to identify the control that has focus? I have several custom controls located on a page. Each instance of the subclass has a grid, one of which will have focus when I ask "which instance of the subclass has focus?" Something like
>>>
>>>myvalue = frmMain.tabs1.page8.currentcontrol.someproperty
>>>
>>>Thanks for your help.
If it's not broken, fix it until it is.
My Blog