>I have a form with a grid which displays a set of records from a cursor. When a user clicks on the record (row) I want to be able to press the enter key which will close down the form and locate the record so that it is displayed on my other form. I know how to loate the record to show its just that I do not know how to allow the user to press enter and to what event should be used.
>
>Any help would be greatly appreciated.
Neil
Seeing as you're using the mouse, how about, at the AfterRowColChange() event you shoot your cursor over to another object (say an Accept Button, or even an invisible control. This control waits for user input then immediately tests for CR, in its Keypress() event. If CR, do your thing, else shoot back to the grid, at the same column and continue as normal. The grid should look no different, still the same row selected, and the user none the wiser that this has happened - as soon as he clicks on the grid again IT gets the focus.
Huh?
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.