Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One or more IF statements?
Message
De
30/07/2008 12:22:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
One or more IF statements?
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01335285
Message ID:
01335285
Vues:
59
Hi All,

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform