Hi,

I have two textbox control, named "Textbox1" and "Textbox2" and one Command Button named "Command1.
Focus currently on "Textbox1".

In Command1 click event i have code something like this:

Private Sub Command1_Click()
Textbox2.Setfocus
etc...
etc...
End Sub

On Texbox1 lostfocus() event i have some condition before it can lostfocus.

My question is how to prevent execute next line code on command1_click event when Textbox2.setfocus failed (Textbox1_lostfocus() event conditon doesn't meet) ?

Thanks.