NewBee VB5 textbox question 
Author Message
 NewBee VB5 textbox question

I am writing a small program in VB5 that has a lot of textboxes for
data input.

I have the tabindex set to go to the next box when the Tab key is
pressed.

My question is : How do you set up the textbox to go to the next box
by pressing the Enter
key, instead of the Tab key ?

Thanks for your Yime

  Bill Dannels



Sun, 23 Sep 2001 03:00:00 GMT  
 NewBee VB5 textbox question
Hi Bill!

Try this.

In the textbox_KeyDown event you write:

    If KeyCode=13 Then nexttextbox.SetFocus

KeyCode contains the ASCII code for the key pressed, 13 is the code for
enter.
I hope it works! /Ezy


Quote:

>I am writing a small program in VB5 that has a lot of textboxes for
>data input.

>I have the tabindex set to go to the next box when the Tab key is
>pressed.

>My question is : How do you set up the textbox to go to the next box
>by pressing the Enter
>key, instead of the Tab key ?

>Thanks for your Yime

>  Bill Dannels



Sun, 23 Sep 2001 03:00:00 GMT  
 NewBee VB5 textbox question
text box has keypress method.
Private sub textboxname_keypress(keyascii as integer)

Enter key is the same as chr(13).
use this to fit your need.
good luck

Quote:

>I am writing a small program in VB5 that has a lot of textboxes for
>data input.

>I have the tabindex set to go to the next box when the Tab key is
>pressed.

>My question is : How do you set up the textbox to go to the next box
>by pressing the Enter
>key, instead of the Tab key ?

>Thanks for your Yime

>  Bill Dannels



Wed, 26 Sep 2001 03:00:00 GMT  
 NewBee VB5 textbox question
Hello !

You can use the following code :

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        NextTextBox.SetFocus
        KeyAscii = 0 'To prevent sound
    End If
End Sub

HTH
Stig Joar Sanden

ICQ: 13557997


Quote:

>I am writing a small program in VB5 that has a lot of textboxes for
>data input.

>I have the tabindex set to go to the next box when the Tab key is
>pressed.

>My question is : How do you set up the textbox to go to the next box
>by pressing the Enter
>key, instead of the Tab key ?

>Thanks for your Yime

>  Bill Dannels



Wed, 26 Sep 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbee VB5 Runtime Question ?

2. Help NewBee /w VB5 Error message

3. VB5 Newbee needs HELP!

4. NEWBEE NEEDS HELP (DeviceIOcontrol) VB5

5. Vb5 Textbox Question

6. Modifing an existing HomeAddress - Newbee Question

7. newbee asp question

8. Another Newbee Question on DBGrid

9. Crystal Report NEWBEE Question

10. Newbee Crystal Report Question

11. NewBee Database Form Design Question

12. NewBee SELECT Question

 

 
Powered by phpBB® Forum Software