>Hi all,
>
>I need to know why the Valid event isn't fired when I change the focus to another control Using the mouse.
>
>Please help me.
>
>Thanks in advance!!!
>
I didn't see any problem in the code. I'd put a Messagebox or WAIT WINDOW before the If DoDefault() line to be sure the event is not firing.
A mouse click won't change the keyboard buffer, so if there is an ESC in there, the code after LastKey() <> 27 won't run if you leave the field by mouse.
David.