As per WhiteRavenEye,
trap the KeyPress event.
What he didn't say is that in this event you should call the SetFocus
method of the next textbox you want to move to.
The easiest way is to have all the textboxes in a nice array.
This way you can use the index parameter to keep track of which
textbox you are in and want to move to
For example
Sub TextBox_KeyPress(Index As Integer, KeyAscii As Integer)
' Assume you have textboxes from TextBox(0) to TextBox(30)
If Index < 30 Then
' set focus to next textbox
TextBox(Index + 1).SetFocus
Else
' set focus back to first textbox
' - or take other action if desired
TextBox(0).SetFocus
End If
End Sub
I hope this is helpful to you.
-----
* * Please include a copy of this note with your reply
Jeff Bennett President
***@Bennet-Tec.Com
Bennet-Tec Information Systems, Inc
50 Jericho Tpk, Jericho, NY 11753
Phone 516 997 5596, Fax - 5597
WWW.Bennet-Tec.Com
RELIABLE Component Software
and Software Development Services
* TList/Pro * ALLText HT/Pro * MetaDraw *
====================== ======================
Post by SteveHi all i am writing a small program and
what i need to do is have some code
When i press a key within a text box it
will type that letter/number in
and then move to the next text box in the tab order.
Use KeyPress evet on textbox...
By WhiteRavenEye