Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference a table field in code
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Reference a table field in code
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
01024763
Message ID:
01024763
Vues:
88
hi all,
I have a problem which i cannot understand as there seems to be a bit of a paradox in the code. I am using a table with 6 fields called valn1-valn6 (all are numeric 10,6), only the last digit changes. i have a loop in which a variable changes from 1-6 and i am trying to build up code so that i can run a condition on the contents of these fields. This code works fine, mx stores the value 1-6.
BROWSE FIELDS ("valn"+ALLTRIM(STR(mx)))
However this code returns "zero" even though on the row from above i can see the value as 5678. If i do not include the VAL of the string i get an operator/operand tye mismatch error which i through was odd given that the fields are all numeric
IIF(VAL(("valn"+ALLTRIM(STR(mx)))) <> 0,"not zero","zero")
any help/pointers much appreciated.
Slán
~M
Go raibh maith agat

~M
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform