Make Enter key default move to next field? 
Author Message
 Make Enter key default move to next field?

Greetings,

I'm just checking if there is a simpler way to make the enter key move to the
next field than just using the KeyPress event - if KeyAscii = Chr(13) then
nextfld.movenext (I'm tired of re-reinventing the wheel - got a history of that
:-).

Rich



Sat, 27 Jul 2002 03:00:00 GMT  
 Make Enter key default move to next field?
I hope you are using the method you describe by setting the KeyPreview
property of the Form to True and placing your code in the Form_KeyPress
event. To automate this for all forms, create an empty form with only this
property and event procedure coded, then place it in the Templates folder
(where the VB executable is located). Then, every time you add a form,
choose this one from the Templates (instead of the usual Form). You never
have to do it again.

Now, why would anyone want to do it?

Quote:
> Greetings,

> I'm just checking if there is a simpler way to make the enter key move to
the
> next field than just using the KeyPress event - if KeyAscii = Chr(13) then
> nextfld.movenext (I'm tired of re-reinventing the wheel - got a history of
that
> :-).

> Rich



Sat, 27 Jul 2002 03:00:00 GMT  
 Make Enter key default move to next field?
Thanks.  I'll give that a shot (dont' need to keep on inventing wheels you
know? :-)


Sun, 28 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Use enter key to move to next field

2. Use enter key to move to next field

3. Using the ENTER key to move to the next field

4. Using ENTER key to move from field to field

5. How do I get the enter key to automatically tab to the next form field

6. Press Enter key to go to next field

7. Advancing to next form field with Enter key instead of Tab

8. Move Between Fields with "Enter" Key

9. Making Enter key as a Tab key

10. Moving in fileds with Enter-key instead og Tab-key

11. Hit ENTER to move to next control ?

12. How do I move cursor to next textbox after hitting enter

 

 
Powered by phpBB® Forum Software