Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One or more IF statements?
Message
 
 
To
30/07/2008 12:22:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01335285
Message ID:
01335288
Views:
9
Try
IF (ISNULL(poGraph.cursor2) OR RECCOUNT(poGraph.cursor2) = 0)
BTW, VARTYPE() returns 'X' for NULL value.


>
>I have a form where I show graphs. I have 3 buttons on this form. One is for collecting the data, second if for generating the report for printing, and the third is for, if there is a 2nd graph for the report (there is only one report with 2 graphs at the moment), toggling between the two graphs.
>
>In the second button, I have a IF statement, where I am trying to determine weather there is not a 2nd graph and was the 2nd graph report selected or if there is, does it have any records in it. My current statement looks like this:
>
>
>IF (VARTYPE(poGraph.cursor2) = "U" AND lnbutton = 5) ;
>      OR RECCOUNT(poGraph.cursor2) = 0
>
>
>I get error 17 – table number is invalid.
>
>PoGraph is an empty class I create. In the first button code, I add properties for cursor1 and cursor2, cursor2 is set to .NULL. (it was .F. before) if the report is not the 2 graph report, otherwise it is set to the cursorname.
>
>Lnbutton holds the number of the report from the report table. 5 is the only report with 2 graphs, all the others have only one graph with them.
>
>Do I need to break this into 2 IF statements, or more, or can it be done as one?
>
>TIA
>Beth
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform