|
-
Feb 20th, 2000, 02:35 AM
#1
Thread Starter
Member
How do I make a command button keep focus while the user is typing in a text box? Dialog boxes have this feature so that when the user finishes typing, he/she can just hit enter. My form has several text boxes and several command buttons. I want each text box to have a cooresponding command button. Thanks in advance.
-
Feb 20th, 2000, 03:00 AM
#2
Junior Member
-
Feb 20th, 2000, 05:03 AM
#3
Member
instead of copying over the code from command1_click ... you can just call the command1_click procedure
and chr(13) should just be 13 I believe
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
command1_click
end if
end sub
------------------
Rapmaster
-
Feb 20th, 2000, 06:11 AM
#4
Thread Starter
Member
Thanks guys. The code works great. I don't know why I didn't think if it before... ;-)
There is one thing though. My text boxes are not multilined, of course, and whenever the I hit enter, the Windows default sound plays. Is there anyway to prevent that? Multilined text boxes would execute the return and then my code. Thanks again.
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
|