Results 1 to 7 of 7

Thread: Switching between text boxes with enter key??

  1. #1

    Thread Starter
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105
    I have a front end for a database that consists of 12 text boxes. What I would like to know is how can I switch to the next text box each time the enter key is pressed?

  2. #2
    Guest

    Post I think

    I think you need to use ascii code. Once ascii 13 is detected, put focus on the next text box. If you need more let me know and ill try.

  3. #3

    Thread Starter
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105

    Talking

    Thanks for the help, I just needed someone to point me in the right direction. I'm still new to VB, coming from C++ so there are a lot of little things I have to learn yet.
    Thanks again...

  4. #4
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308
    Hi.

    Code:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            SendKeys "{tab}"
            KeyAscii = 0
        End If
    End Sub

  5. #5
    Guest

    Post Hey...

    Hey Dr_Evil, what are you doing coming FROM C++, if i new C++ i would never touch VB. (But thats just me)

  6. #6

    Thread Starter
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105

    Talking

    Well I'm currently helping out our in house programmer who uses VB for most everything. I'm always looking to put more experience behind me so I agreed to help him out. To tell you the truth I actually enjoy VB, so far it's been very easy for me to learn & you can build simple apps much faster. On the other hand it's not very object oriented, (although I heard the next VB will be) and therfore no where near as powerful. (;-D Anyway sorry to bore you with the details, just figured I'd fill everyone in...

  7. #7
    Guest

    Post Ok...

    Good answer...

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