Jim,
And you call it simple????????!
>
>In the Gotfocus Of the container you set teh defautl proeprty of the button to .F. and in the keypress of each textbox you put;
>
>
>IF nKeyCode = 13
> IF EMPTY(This.Value)
> NODEFAULT
> Thisform.MethodCalledByTheDefaultButton
> ENDIF
>ENDIF
>
>
>In the LostFocus of each textbox you put:
>
>
>Thisform.DefaultButton.Default = .T.
>
>
>You might want to add a property to the textbox class to hold the name of the default button so it isn't hardcoded.
If it's not broken, fix it until it is.
My Blog