>Hi all
>
>In my mover class I have 3 buttons, Add, Remove and Ok. The Ok button is the default button. After selecting a record when the Add buttons is clicked the Default button status is shifted to the Add button.
>
>How can I avoid this behaviour, except for force coding?
>
>UPDATE: Actually I am wanting the Ok button to work only for Ctrl+Enter rather than a simple Enter, is this possible.
No if you set it to be Default. But you could set Default = .f. for that button and Set KeyPreview = .t. for form and in KeyPress Event of the form put:
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode == 13 AND nShiftAltCtrl == 2
NODEFAULT
thisform.ButtonNameHere.Click()
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.