PDA

Click to See Complete Forum and Search --> : Switching between text boxes with enter key??


Dr_Evil
Apr 24th, 2000, 12:43 AM
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?

Apr 24th, 2000, 01:13 AM
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.

Dr_Evil
Apr 24th, 2000, 01:42 AM
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...

LG
Apr 24th, 2000, 08:39 AM
Hi.


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

Apr 24th, 2000, 12:20 PM
Hey Dr_Evil, what are you doing coming FROM C++, if i new C++ i would never touch VB. (But thats just me)

Dr_Evil
Apr 25th, 2000, 04:21 AM
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...

Apr 25th, 2000, 05:45 AM
Good answer...