Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If statement
Message
De
20/10/2004 04:02:13
 
 
À
20/10/2004 03:43:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00952761
Message ID:
00952920
Vues:
17
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform