How can I have a field on a form that is a single character so that when the operator enters a valid character, the cursor moves to the next field without having the operator hit the enter or tab key? Thanks, Eddie
How can I have a field on a form that is a single character so that when the operator enters a valid character, the cursor moves to the next field without having the operator hit the enter or tab key? Thanks, Eddie
Try the Change event, the Len() function and the .Text property of the textbox.
Like this:
Code:Private Sub TargetControl_Change() If Len(Me.TargetControl.Text) = 1 Then NextControlName.SetFocus End If End Sub
Linq ;0)>
This worked fine. The only tweak I needed was that if the entered data was more than one character, I trimmed it down to just the leftmost one... Thanks.