|
-
Nov 27th, 2000, 04:02 PM
#1
Thread Starter
Member
I am using the following code on a text box. All I am doing is using the enter key as a tab to take me to the next text box or a command button. (Of course I have some error checking built in). My question is however, if I use the "TAB" key it will tab to the tabstop. No questions asked.
If I use the "ENTER" key, it will tab to the next tabstop like it should BUT I get this annoying ding. Like the error ding in Windows. I have cut the volume down on my laptop, ran the program on a different PC and everytime the same annoying ding!!!
Can someone please help before I go postal on this PC!!!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub txtPurgeTrans_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
do something ....
EndIF
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
Nov 27th, 2000, 04:11 PM
#2
lol...like the postal comment
Whay are you trying to get the Return key to act like a tab key. Check the err and err.description after your return key check, you may be able to trap whats happending.
[code]
MsgBox err + " " + err.description
That may or may not help.
-
Nov 27th, 2000, 04:11 PM
#3
Set the MultiLine to True, then add this code.
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
KeyAscii = 0
'do something here
End If
End Sub
-
Nov 27th, 2000, 04:50 PM
#4
Thread Starter
Member
DING!!!
Megatron,
Thanks that worked. Now I'm not going crazy hearing that dinging!!
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
|