Add the following code to the keypress event to "eat" the "V" or "v" keystroke:
if nKeyCode = 118 or nKeyCode = 86
nodefault
endif
The nodefault command prevents the default action from occuring in an event.
>I am using the keypress event in a form to trap for keystroks that then run the click event of a command button. In this case I want to trap for the V key so the user does not have to hit ALT+V . All works well in launching the form. Problem is, when comming back to a form after running another form that keypress seems to still be in a buffer and it runs the form a second time. If I use the mouse on the command button it all works ok. I have tried everything I know to get rid of that keystroke. I have tried clear typeahead, wait window, do while chrsaw() etc. I have also tried setting focus to the grid I am using for a picklist thinking that the command button still has the focus. Any ideas out there???
kenweber
GCom2 Solutions
Microsoft Certified Professional