I'm building a data entry form that includes a Submit button which runs a script. This works fine, but I'd like to take the extra step.
In my experience with most web forms, the Enter key can be tied to a certain command, regardless of the cursor location in the form. I'd like the enter key to be tied to this Submit button. Then, regardless of which field currently has the focus, hitting Enter will run the Submit script.
So, how do I tie the Enter key to the Submit button?
My best guess is to make an OnKeyPress event for every single enabled text box. For obvious reasons, I'm hoping there's a better way.
Key Preview =True
should be in the Load() event. Other than that, this works quite well using KeyPress. – Nakasuji