|
-
December 8th, 1999, 05:45 AM
#1
Press ENTER instead of TAB to go to next text Box
how can you move to another text box just by pressing ENTER instead of the TAB key
-
December 8th, 1999, 06:05 AM
#2
Re: Press ENTER instead of TAB to go to next text Box
Make the text box multiline
Then in the _KeyPress event add this code
private text1_keypress(keycode as integer...)
if keycode = vbkeyreturn then
keycode = 0
SendKeys vbkeytab ' or the correct syntax
end if
end sub
private text1_keyup(keycode as integer...)
if keycode = vbkeyreturn then
keycode = 0
end if
end sub
However this works only for singleline text boxes.
RK
-
December 8th, 1999, 09:38 AM
#3
Re: Press ENTER instead of TAB to go to next text Box
Hi,
Use the following code:
private Sub Text1_KeyDown(KeyCode as Integer, Shift as Integer)
if KeyCode = vbKeyReturn then
text2.setfocus
end if
End Sub
I hope this works!!!
regards,
Santulan
Santulan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|