Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If statement
Message
From
19/10/2004 17:42:57
 
 
To
19/10/2004 16:09:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00952761
Message ID:
00952820
Views:
10
if thisform.pagefram1.page1.text1.value>2 OR  thisform.pagefram1.page1.text1.value < 0
indicates that 0 is a legal value. Your messagebox says from 1 to 2.

Was the value 0 when you tested this????

The arguements to the BETWEEN function set the upper and lower limits. A value that matches one of them results in the statement evaluating to TRUE. Make sure that the arguements represent the actual range of acceptable results.

For testing purposes, you might also consider putting something like
=messagebox("Congratulations, you've entered a correct value")
in the ELSE block.


>hi,
>
>i try to do this statment but nothing happend
>
>thisform.pagefram1.page1.text1.setfocus
>
>
>If NOT BETWEEN(thisform.pagefram1.page1.text1.value,0,2)
>       =messagebox("the range from 1 to 2 only")
>       thisform.pagefram1.page1.text1.setfocus     && nothing happend
>else
>......
>endif
>
>thanks
>m.qasem
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform