I cannot understand what you wrote in your MessageBoxes !!! :-)
Anyway I would act like this :
Create a Procedure in your form i.e. SetPages
Parameters xpage
Private i, memPage
with thisform.YourPageframe
&& Store the actual Activepage
memPage = .ActivePage
&& Disable all of th Pageframe pages except the activepage and the xpage
For i = 1 to .pagecount
.pages(i).enabled = (I = MemPage) or i = xpage )
endfor
endwith
In The lostfocus event of any of the textBoxes make a call to the procedure passing as parameter the page to activate
Or you could store anything in the "SetPage" procedure if you pass as parameter also the value of textbox.
HTH
Alessio
>thank you for reply,
>i try with this code under, but i have more than 15 pages.
>
>DO CASE
> CASE NOT BETWEEN(thisform.pageframe1.page16.text1.value,1,2)
> =MESSAGEBOX("ÇÎÊíÇÑ ÎÇØÆ")
> thisform.Pageframe1.ActivePage = 16
> thisform.pageframe1.page16.text1.SetFocus
> thisform.pageframe1.page15.Enabled=.f.
> CASE thisform.pageframe1.page16.text1.value=2
> =MESSAGEBOX("ÓíÊã ÇáÇäÊÞÇá Çáì ÓÄÇá ÑÞã 10")
> thisform.Pageframe1.ActivePage = 7
> thisform.Pageframe1.Page7.Text1.SetFocus()
> OTHERWISE
> thisform.Pageframe1.ActivePage = 15
> thisform.Pageframe1.Page15.Text1.SetFocus()
>ENDCASE
>
>
>thanks.
>m.qasem