>Hello, Bruce
>Thank you for your reply, I already use this method ( Deactivate) but when I insert Page1.SetFocus in this method-first Page2 gets Focus and Page1 doesn't.
>
>Do you have some idea why Page1 doesn't receive Focus again. ( In fact it doesn't lose it)
>
>Thanks,
Galia,
Don't call the page's setfocus, instead assing the page number to the pageframe's activepage property. For example in the deactivate of page 2
IF EverythingIsNotAllRight
THIS.Parent.ActivePage = 2
ENDIF
To keep focus on page 2 until the data is correct. I would also give the user a messagebox to inform them of why their click is being ingored, and put focus into the control you want as in;
IF EverythingIsNotAllRight
MessageBox("You must complete page 2 before moving to another page", 0, ;
"Information")
THIS.Parent.ActivePage = 2
THIS.Text1.SetFocus()
ENDIF