Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object not found
Message
 
À
13/03/2006 02:57:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01103622
Message ID:
01103623
Vues:
23
>hi all,
>
>i try to run this code as under, i got error message
>Object "bill" is not found
>
>CLOSE all
>USE bill in 0
>USE contact in 0
>
>replace IN contact ;
>***   FOR cc==LOOKUP(bill.cc,cc,bill.cc) AND NOT EOF('bill') ;&&old as prg.
>
>   FOR thisform.text1.value==LOOKUP(bill.(thisform.text1.value),(thisform.text1.value),bill.(thisform.text1.value) AND NOT EOF('bill') ;&&new via form
>   val with VAL(bill.bill_value)
>
>
>
>thanks.

You are using bill.(thisform.text1.value) twice, and is not a valid expression, what you probably want to put there is something along this lines:
lookup(evaluate("Bill." + thisform.text1.value), thisform.text1.value, evaluate("Bill." + thisform.text1.value))
Assuming thisform.text1.value is the name of some field in the Bill table.

Better might be something like
lcField = alltrim(thisform.text1.value)
LookUp(Evaluate("Bill." + lcField), lcField, Evaluate("Bill." + lcField))
You might also want to consider some error handler.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform