You could always use INLIST with Class to determine that.
>>>I use _VFP.ActiveForm.ActiveControl.SetFocus, so the current control loses focus to regain it! :-)
>>
>>Great. That did the trick.
>>
>>Funny though that setting the focus to the control causes this behaviour. :-)
>
>One thing I thought after sending the message; I think that if ActiveControl is a grid, then this trick doesn't work. What I do in those cases is to SetFocus to another control (or column of the same grid) and SetFocus back where the user was. Perhaps a little experimentation with that case is in order...
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05