Thanks guys. I think that will work. I was not familiar with lastkey().
>>I would like to execute a program (*.prg) when the user exits a textbox via the return key but not trigger the program if he tabs or clicks out of the textbox. Any ideas on how to do this?
>
>Don,
>
>Try this in Textbox.LostFocus
>
>
>IF !MDOWN() AND LASTKEY() = 13
> * Do your prg here.
>ENDIF
>
>
>HTH
>
>Sorin