Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object not found
Message
 
To
13/03/2006 02:57:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01103622
Message ID:
01103623
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform