For the button you want to have the "Click" event fired when the Enter key is pressed, set the DEFAULT property to .T.
If you have a button (like EXIT) that you want to have close the form by hitting the ESCape key, set the CANCEL property to .T. for that button.
Only 1 button on a form can be properly designated as the "Default" button. Same for the "Cancel" button.
>Hai experts!
>
>Im working with five command buttons;(1) add,(2) Save,(3) edit,(4) display & (5) exit.
>And for data entry I ahve nine text and corresponding label.AT Add command I enabled=.f. for other command. Finaly at Text9, I have chose keyprees and codeed;
>
>
>if nKeypress=13
>form1.command2.enabled=.t.
>form1.command3.enabled=.t.
>form1.command4.enabled=.t.
>endif
>
>
> I want that the save command button (=command2) will be automatically selected and by pressing enter I can proceed further. But in my case the other command button is being selected. How I can select my choice Command (here it is save) ?
>
>Chandan
Mark McCasland
Midlothian, TX USA