* Set form's current control Thisform.oCurrentControl = ThisIn the form's destroy put;
* Clear the form's current control This.oCurrentControl = NULLIn each command button's Click put;
* Your code here. * followed by ... Thisform.oCurrentControl.SetFocus()This will allow the command buttons' click code to run without allowing the command buttons to ever actually get focus and will make the Enter key always fire the default button's click code.