2
Answers

How to use Validating event with a text box

ray dona

ray dona

13y
13.6k
1

Hi, How do I get the event ‘TextBox_Validating’ to be called after text had been entered into a text box and the carriage return key had been pressed? At present after carriage return is pressed nothing happens. Focus remains with text box and after debugging it appears the event is never invoked. It seems focus needs to be moved away from text box for the event to be triggered. But I have no other controls after text box to focus on. Should I use another event such as Keypress before Validating to handle the carriage return? I would be very grateful for all suggestions.

Answers (2)