>>Dear all,
>>I have a text box for the user to input numbers. I want to do a form(for example, do form2) only after he typed the numbers (for example, 120) and press the Enter key but not Tab, mouse click, or other action. I don't want to use the Lostfocus event, it is not suitable in my case but I cannot find a "Press Enter" event, anyone can help?
>
>Power,
>
>In the Textbox Keypress event you can;
>
>
>IF nKeyCode = 13
> NODEFAULT
> DO FORM Form2
>ENDIF
>
>
>Be sure that form2 is modal or else the focus will return to the textbox before the form has completed its job.
Jim and Craig,
Thanks both of you for helping me, I will use the Keypress event.
Power
Power Wong
Every problem will have a solution, the only problem is that can you find it out.