Results 1 to 3 of 3

Thread: Using Enter Key as Tab Key

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    46
    I have a program in which a lot of data will be entered and stored in a database. Is there anyway to make the "Enter" key act like the "Tab" key to move from one text box to another. It will be easier for the users to press the enter key instead of having to press the tab key.

    Thanks.

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    On the keypress events for the text boxes, put in the following code. It will replace the return key with a tab key entry:

    If KeyAscii = vbKeyReturn Then
    KeyAscii = vbKeyTab
    End If

  3. #3
    Guest
    This will work:

    Code:
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then
    SendKeys "{TAB}"
    End If
    End Sub

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