Move Between Fields with "Enter" Key 
Author Message
 Move Between Fields with "Enter" Key

I am not sure, but you can either do this:

Private Sub Control_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then KeyAscii = 8
End Sub

Or:

Private Sub Control_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 13 Then KeyAscii = 0: SendKeys "{TAB}"
End Sub

<Ryan Faricy>

Quote:

>I want to move to the next control on a form using the "Enter" key as
>well as the "tab" key.  How is this done with VB5?

>Pllease e-mail me.

>Thanks,

>Michael Jenkins
>Control Tech Consulting Inc.
>(905) 790-1507
> http://www.*-*-*.com/ ~jenkinsm



Sun, 10 Sep 2000 03:00:00 GMT  
 Move Between Fields with "Enter" Key

I want to move to the next control on a form using the "Enter" key as
well as the "tab" key.  How is this done with VB5?

Pllease e-mail me.

Thanks,

Michael Jenkins
Control Tech Consulting Inc.
(905) 790-1507
http://www.interlog.com/~jenkinsm



Mon, 11 Sep 2000 03:00:00 GMT  
 Move Between Fields with "Enter" Key

Quote:

>I want to move to the next control on a form using the "Enter" key as
>well as the "tab" key.  How is this done with VB5?

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        KeyAscii = 0
        SendKeys "{Tab}"
    End If
End Sub

Lee Weiner
weiner AT fuse DOT net



Mon, 11 Sep 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Disable "ENTER" key in text box

2. need help with "enter" key

3. VB4 and "Enter" key

4. "Enter" key inside of a textbox

5. Inserting "Enter Key" into a string

6. Using ENTER key to move from field to field

7. Vertical bars "|" in Key Fields

8. Use enter key to move to next field

9. Make Enter key default move to next field?

10. Use enter key to move to next field

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

12. disable keys like "key WIN", ctrl-ESC, ALT-TAB

 

 
Powered by phpBB® Forum Software