VB.Net - How do I prevent a text box changed event firing unless the user presses TAB (or ENTER)
Posted on 2011-05-09
I want to be able to error check the value of a textbox (could be decimal, float, text or integer). At the moment as soon as the user begins to type (anything) into the text box, the change event fires and various msgboxes appear depending upon whether the text input was numeric or not.
Is ther a way of switching off the event until the user presses the Enter or TAB key to indicate they are ready to move on to the next field?
I suspect something like: if keydown = TAB or ENTER, then error check, otherwise ignore.
Any ideas, please?