If you do not want the form to do this [KeyPress] set the KeyPreview property of the form to false.
>Hello All,
>
>Having some troulbe with this one. I have a simple form for a matching program. The form has fields from the free table, and a button set that modified. I did not need all the buttons from the standard buttons that you get when you create a form with the wizard. My problem is when I press the key for the button the keypress event fires, as does the click event for the button!!! But if I click the button, only the click event fires as it should. I am running VFP7.0 with sp1.
>
>Cheers.
Mark McCasland
Midlothian, TX USA