Grooper 21.00.0082 is available as of 12-12-2023! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.1.0016 is available as of 03-15-2024! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.00.0042 is available as of 03-22-2024! Check the Downloads Discussion for the release notes and to get the latest version.

Automatically moving to the next field

My users are picky!  They don't like pressing the tab key to move to the next field during Data Review.

So on fields that have a fixed number of digits they want the the cursor to move to the next field after the last digit has been typed.  For example, a social security number has a fixed length of 9 digits.  They want the next field after the SSAN to get focus after they have entered the full 9 digits without having to press the Tab key.  This is also true for phone numbers and other specialized codes that we use.  They say that it will help during the data-entry for the many had-written documents that don't OCR.

Is this possible?

Thanks in advance.

Answers

  • jclarkjclark Posts: 60 ✭✭✭
    @Tony
    Much as you did with the issue  in:
    https://xchange.grooper.com/discussion/1088/moving-to-the-next-form-field-after-single-key-press

    You need to cast it to TextBox (instead of ComboBox)
    and use the "TextChanged" event instead of the "SelectedIndexChanged" event

    From your previous posting listed above.

            If MoveNext Then
                    Panel = e.Panel
                    NextField = CType(e.Instance.ParentElement(e.Field.NodeIndex + 1), FieldInstance)
                    ComboBox = TryCast(e.Instance.LinkedControl.Control, ComboBox)
                    AddHandler ComboBox.SelectedIndexChanged, AddressOf ComboBox_SelectedIndexChanged
                End If
            End Sub

    Let us know if this helps, or if you need more detailed help with the script.



  • TonyTony Posts: 23
    I actually did try exactly what you suggested except that it is a MaskedTextBox, but I couldn't figure out how to capture how many key strokes had been typed.  I also tried just comparing the character count of the field to the size I'm expecting (9 in the case of SSN) but that doesn't work either because if the OCR'd value is 9 characters or if it is incorrectly entered with 9 characters you would never be able to place the cursor in the field again without it automatically jumping the the next field.  Am I just thinking about this all wrong?

    I truly appreciate the assistance.
Sign In or Register to comment.