Automatic Tab to the Next Field with Maximum Character Limit in a Text Box

This need was established by developing VB applications for 3270mainframe apps. A user typing in a 3270 edit field is automaticallyplaced into the next field once reaching the maximum number ofcharacters for the field:

 Code:Sub Text1_KeyUp (keycode As Integer, _        Shift As Integer)If keycode > 47 And keycode < 123 _        Then 'Only advance if they have just typed 'a number or character.If Len(Me.ActiveControl.Text) = _        (Me.ActiveControl.MaxLength) Then       SendKeys "{TAB}", TrueEnd IfEndifEnd Sub
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: