Quote Originally Posted by Peter Bosch View Post
Hi Garret!

Thanks for the code - I tried it and at first glance it works fine - I will test it more.

One thing I don't understand: why is this code necessary when you put the code inside your dbGrid object:
If (iFocusObject = oDbGrid) Begin
Could the focus be on an other object, when you put the code inside the grid?
I now have it in my dbGrid subclass with this line of code:
If (iFocusObject = current_object) Begin
but I'm not sure, if I need this.

What if you are "mousing in" from outside of the dbGrid? I haven't tested, but it is possible the actual focus change is after the mouse_down.

The thing I would worry about is mousing to a form outside the grid, then mousing back into the grid to a different line.

I've always used item_change for this type of code. You can determine using base and the number of cols whether the new is a different line, then can check should save to see if something else has not already performed the save.