It works when F9 is press. Its when you hit F10 that it happens. I tried NODEFAULT but the text is wiped out before the the command is even hit in the case statement. (See also my reply just now to Borislav.)
>Try to add NODEFAULT to the case when F9 is processed.
>
>>If I hit F9 then the save works.
>>If I hit F10 then the current object loses all text that has been entered.
>>If I do not map F10 to F9 then nothing happens and the text is unchanged.
>>
>>We use command buttons on all our forms. The keypreview is turned on in the forms and there is a case statement in the form keypress that looks for any hot keys used in the command buttons and if one is hit then a procedure or whatever is run from the case statement. This has worked really well for us for a number of years.
>>
>>As I said, the Only change that caused this problem is changing the form from Modal to Modeless. If I change the form back to Modal it works ok.
>>John.
>>
>>
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn