locked
Is there any Events that triggers when the Cursor left a Field or textbox RRS feed

  • Question

  •  

    I have a Form to maintain the Customer Data and I want to retreive the records when the user type the Customer ID and press TAB or ENTER (In this case I made the ENTER works like TAB, because I don't like the sound it makes when ENTER is pressed).

     

    I have a Button that does what I want, but I want it this way, because the Customer ID is not generated by the program, I let the User type it the way he/she wants it.

     

    The Big picture of this is that I don't want the User type all the information and check later that this ID is already assigned to another customer.

     

    I wanted to do it with the ENTER Event, but when the Form was runned I have a validation in the "Get Records Button" that checks if the Field is empty displays and error, this error is displayed in this event, every  time I run the program I don't know why!

     

    So I realized that I need to launch this event when the user left the textbox.

    Friday, August 17, 2007 5:42 PM

Answers

  •  

    Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave

    End Sub

     

    or lostfocus

    Friday, August 17, 2007 5:51 PM

All replies

  •  

    Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave

    End Sub

     

    or lostfocus

    Friday, August 17, 2007 5:51 PM
  • Yes!

    At last!

     

    Thank you very much!

     

    Friday, August 17, 2007 5:56 PM