>>I have a checkbox in a form that has TabStop set to .F. . When the checkbox
>>is changed by clicking with the mouse i want to set focus back to the object
>>that was active before. I have put a Nodefault in the GotFocus of the checkbox,
>>so the focus is moved to another control. But how do i code to put
>>the focus back to the previous active control ?
>
>You can save refrence to the previous control in the When and set focus to it in the GotFocus()
>Thisform.oPrevControl = Thisform.ActiveControl
>
>* Checkbox GotFocus
>NODEFAULT
>Thisform.oPrevControl.Setfocus()
>
You'll have to add check that Thisform.ActiveControl has valid value.
That was really fast Sergey, and it works fine. But what about checking
for a valid value ?
/Torgny