Hi Christian,
This may be tangential, but a trick with Grids is to put them into a Container which does support SetFocus(). When the Container receives focus, so does the Grid.
>HI,
>I've put this in my click() method of my base class toolbar button :
>
>_Screen.ActiveForm.ActiveControl.Setfocus()
>
>To make sure that if a control has the focus when I issue TABLEUPDATE(), the toolbar button will act Like a command button on the form, it will save all fileds even the one of the textbox that have the focus on. But when the activecontrol is a grid, I get the error message :
>
>ACTIVECONTROL is not an object.
>
>Is there a way to execute the code for all controls but not for a grid ? I tried:
>IF _Screen.ActiveForm.ActiveControl.Baseclass <> "GRID" but I get the same error message.
>
>Thank you for your help,
>
>Christian Cote
------------------------------------------------
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