Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If statement
Message
From
20/10/2004 04:02:13
 
 
To
20/10/2004 03:43:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00952761
Message ID:
00952920
Views:
15
In your case, a DO CASE is more readable, and it will probably make debugging easier
DO CASE 
   CASE BETWEEN(thisform.pageframe1.page16.text1.value,1,2)
      =MESSAGEBOX("Hit 1")
      thisform.Pageframe1.ActivePage = 16
      thisform.pageframe1.page16.text1.SetFocus
   CASE thisform.pageframe1.page16.text1.value=2 && Case no. 2
      =MESSAGEBOX("Hit 2")
      thisform.Pageframe1.ActivePage = 10
      thisform.Pageframe1.Page10.Text1.SetFocus()
   OTHERWISE 
      =MESSAGEBOX("Hit 3")
      thisform.Pageframe1.ActivePage = 15
      thisform.Pageframe1.Page15.Text1.SetFocus()
ENDCASE
But there is something wrong with your logic, I guess you will see it easier now.

>hi,
>
>thank you i take away the NOT ,he move to another page as if the condition is ok.
>
>but still i cant see the cursor if the result is not ok.
>
>this is all code at mytext at this page
>
>
>IF  BETWEEN(thisform.pageframe1.page16.text1.value,1,2)
>          =MESSAGEBOX("ÇÎÊíÇÑ ÎÇØÆ")
>             thisform.Pageframe1.ActivePage = 16
>             thisform.pageframe1.page16.text1.SetFocus
>else
>     if  thisform.pageframe1.page16.text1.value=2
>           =MESSAGEBOX("ÓíÊã ÇáÇäÊÞÇá Çáì ÓÄÇá ÑÞã 10")
>           thisform.Pageframe1.ActivePage = 10
>           thisform.Pageframe1.Page10.Text1.SetFocus()
>     else
>          thisform.Pageframe1.ActivePage = 15
>          thisform.Pageframe1.Page15.Text1.SetFocus()
>    endif
> endif
>
>thanks.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform