Results 1 to 4 of 4

Thread: DING!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    46

    Angry

    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

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  2. #2
    Guest

    Wink 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.

  3. #3
    Guest
    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

  4. #4

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    46

    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
  •  



Click Here to Expand Forum to Full Width