>>>>Hi everybody,
>>>>
>>>>We have a login form with two textboxes and two command buttons (Login and Cancel). User types user name, presses Enter, cursor moves to password, he types it, presses Enter and the cursor goes to Login button, but doesn't fire the click, so user has to press Enter button again.
>>>>
>>>>Do you know, how can we exclude the necessaty of this additional click?
>>>>
>>>>Thanks in advance.
>>>
>>>*** txtPassword.LostFocus()***
>>>this.parent.cmdLogin.Click()
>>>
>>
>>Interesting... However, what if he/she types password, then decides to go back to User ID field? :)
>
>Try this instead:
>
>***txtPassword.KeyPress()***
>LPARAMETERS nKeyCode, nShiftAltCtrl
>IF nKeyCode = 13
> this.parent.cmdLogin.Click()
>ENDIF
This is exactly what I had in mind asking this question. I'll try this in a moment.
I still want to use Enter to move from one textbox to another on the login form because all other Windows Login screens operate this way.
If it's not broken, fix it until it is.
My Blog