>Hi Wayne,
>
>Tried it out and surprisingly.... the KeyPress() event is not fired for the textbox. The only way I could trap it was from the Form's KeyPress() event and the Form's KeyPreview has to be set to False.
>
>Found the same in VFP6 too.
>
>>Drop a text box on a form and place a WAIT WIND 'Not Cool' in the KEYPRESS event. Then press a letter. The WAIT WIND will fire. Press ALT+A,B,C,D,E,...
>>The method will not fire.
>>
>>The KEYPRESS of the form might fire, but the action you want in the text box will not fire.
>>
>>Wayne
It must be one of those undocumented 'features'. I am wondering if the Ctrl and Alt keys - somehow - are putting scope back on the form??? Possibly anticipating firing a menu item???
Just thinking outloud - while typing.
Anyway, thanks for the input... we don't want to put the code in the base of the form, instead, we are adding a menu item that will react to our Alt-S command.
Thanks
Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown