Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    limit digits in a text box (2000-SR1)

    I would like to be able, when the third digit is entered in a text box to jump to the next text box on the form.
    Like with a KeyUp event on the third digit to go to txtNext.SetFocus or something like that?

    Warren

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: limit digits in a text box (2000-SR1)

    Think twice before doing this:
    - It makes it more difficult for users to correct mistakes.
    - If you have a Before Update event for the text box that cancels the update under some circumstances, that will conflict with jumping to another control.

    If you still want to do this, you can use the On Change event:

    Private Sub txtThis_Change()
    If Len(Me.txtThis.Text) >= 3 Then
    Me.txtNext.SetFocus
    End If
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •