Hi!
If you need just to disallow to move to the next row, in the AfterRowColChange event, when row is changed and data not valid, return record pointer back to previous record position and refresh the grid - this should be enough. In VFP7 there is a RowColChange property that allow to determine in AfterRowColChange event code what was changed (row or column). In VFP6 you have to remember the current record pointer in some property of the grid or in the form, then update in the AfterRowColChange event to keep it in synch. When in AfterRowColChange current record pointer (RecNo()) does not match to the stored value - row is changed.
>Dear Vlad,
>
>The solution you provided can trap the wrong entry, however, the code disallow the cursor to move to the next column.
>Is there anything can be modified ?
>
>Regards,
>
>Ransome
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.