A simple TEXTBOX question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to execute a piece of code on textbox1.text WHEN the user (cursor)
exit that box (using the TAB or ENTER key). Not at every keyboard entry on
that box like I am getting right now with:

Private Sub TextBox1_TextChanged...

I dont see nothing into properties to achieve that.

Thank you very much again
 
Marcel Saucier said:
I want to execute a piece of code on textbox1.text WHEN the user (cursor)
exit that box (using the TAB or ENTER key). Not at every keyboard entry on
that box like I am getting right now with:

Private Sub TextBox1_TextChanged...

I dont see nothing into properties to achieve that.

Thank you very much again
--
Marcel Saucier
Mississauga, Ontario, Canada
Super Basic programmer under DOS since 1983. Absolutely dummy (& new)
VB.NET
programmer under Windows since september 2005. It's about time to upgrade
?

You're using the default event for a TextBox object, TextChanged, which is
behaving exactly as intended. Try placing your code in an event procedure
for the Leave or LostFocus event if you want to react when the user is
finished entering data into the TextBox object.
 
Move your code to LostFocus event of the text box. TextChanged, as intended,
will fire for every change.

I want to execute a piece of code on textbox1.text WHEN the user (cursor)
exit that box (using the TAB or ENTER key). Not at every keyboard entry on
that box like I am getting right now with:

Private Sub TextBox1_TextChanged...

I dont see nothing into properties to achieve that.

Thank you very much again
 
Hi Peter & Siva,

It does work ! I just realized the lot of choice that I have, on the Studio
menu, for a particular objet...

My God, I still have a long way to go !
 
It is working ! I realized all the choices of actions from the Studio menu...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top