>>Command buttons have a property called Default. Of course, setting this property to .T. tells the system to execute the click event of a command button when Enter is depressed by the user. Right now I am building a simple form, with no pageframes, just data entry fields and command buttons. For some reason the Default property for all my command buttons are set to .T. at run time. So if the user were to hit the Enter to key to get from field to field, instead of the tab key, the code behind my first command button is executed. I need some help to solve this problem. I have tried several things, but even if I set the Default property to .F. at run time, just moving the mouse sets it back to .T. Thanks for any input.
>
>I've had stumbled upon this at the very beginning, and this issue had me going up and down my soapbox over the famous Guidelines for creating a GUI etc etc, and finally concluded that we're doing data ENTry, and not data TABby, so here's what I have in my textbox (and few other) classes' KeyPress event:
>[snip]
> case nKeycode=13
> clea type
> keyb '{tab}' plain
> nodefault
>[snip]
>Works happily ever after - and I've almost forgotten the problem. HTH
>
>
> Thank you very much!! I will put your your code into practice today. Have a good day.