Results 1 to 8 of 8

Thread: Changing the default button on my form based on text input

Hybrid View

  1. #1
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Changing the default button on my form based on text input

    You could set the focus to the button

    VB Code:
    1. Private Sub Text2_LostFocus()
    2.    if len(text1.text) > 0 then   cmd2.SetFocus
    3. End Sub

  2. #2

    Thread Starter
    Member
    Join Date
    Dec 2004
    Posts
    56

    Re: Changing the default button on my form based on text input

    Doesn't quite work.. The field will need to accept 4 - 6 digit numbers. Using this code, I input the first number and the focust jumps.. have to click back in the text field, input the second number, the focus jumps again.. etc.

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Changing the default button on my form based on text input

    sorry. i edited it after i noticed that.

Posting Permissions

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



Click Here to Expand Forum to Full Width