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?
Printable View
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?
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.
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...
Hi.
Code:Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Hey Dr_Evil, what are you doing coming FROM C++, if i new C++ i would never touch VB. (But thats just me)
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...
Good answer...