>I am having a problem with a grid. I am using the grid to allow selection of a record and show the memo field for that record on the same form. It works fine if I use the mouse to click on the grid, but if I use arrows to scroll in the grid, there is a wierd 1 record delay. I am using the KeyPress method in the text field of the grid.
>here is the code i am using:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>ThisKey = nKeycode
>ThisShift = nShiftAltCtrl
>
>if ThisKey = 24
> Thisform.edit1.refresh
>endif
>if ThisKey = 5
> ThisForm.edit1.refresh
>endif
>
>What happens is that when using the arrow keys, the memo field shows the contents of the previous record, like there was a lag of 1 keystroke. If I use the mouse to click on the grid, it works fine.
>
>Any help would be appreciated
>
>Thanks
>
>Michael Sullivan
Michael,
It's what is expected. "Keypress"ed in previous record.
Instead just put :
ThisForm.edit1.refresh
in grid.afterrowcolchange.
Cetin