The problem I have is with the TreeView controle. When no other control can get the focus the TV can. Why is that ? Because it is an ole control ??How about trying this? When the grid's Valid returns .F. ( or 0 ) so that the grid does not lose focus, Disable the TreeView using this line of code:
Thisform.oTree.Object.Enabled = .F.
Then you can re-enable it when the grid's Valid reutrns .T.
The only problem is that the grid's Valid does not fire if you try to click on the TreeView when it is disabled, so you will need something more to re-enable the TreeView.