>>Here is the set up:
>>
>>1 form
>> containing a focused grid with N columns,
>> a text box,
>> and a single button that will close the form.
>>
>>Here is the challenge:
>>
>>without using the mouse, ctrl-tab, or ctrl-enter,
>>exit the grid, type a value into the textbox and close the form.
>>
>>Good luck.
>>All winning entries will receive my thanks. :)
>
>Additional Rules:
>
>Do to the nature of most Point of Sale keyboards, key combinations not a possiblity. ALT + key won't do.
>
>Hints:
>
>If the grid had a keypress event, I would trap the enter key and simply go to the next control in the tab order. Alias, grids have no keypresses.
Sam,
If keypress is the answer then grids have an indirect keypress event. Set form.keypreview to .t. and in form.keypress check your key(s) + if current control is grid. This slows down slightly but better than poking keypress code to every control in grid (especially if your controls are not fixed).
cetin
Cetin