Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unknown member
Message
From
20/03/2006 07:05:01
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01105751
Message ID:
01105766
Views:
21
hi,
i try , i got 2 errors
CLOSE all
   lcTable1 = alltrim(thisform.text5.value)
   lcTable2 = alltrim(thisform.text6.value) 
   lcBillValue = lcTable1. bill_value&&"lcTable1" is not an object 

    Use ( lcTable1) in 0
    Use ( lcTable2) in 0

 lcField = alltrim(thisform.text1.value)

replace IN  lcTable2 ;&& Too few arguments 
   FOR EVAL(lcField)==LookUp(lcTable1.&lcfield), EVAL(lcField), (lcTable1.&lcfield)) AND NOT EOF('lcTable1');
NEWVALUE with VAL(lcBillValue)
the old code i use it, it works
CLOSE all
USE bill in 0
USE contact in 0
 lcField = alltrim(thisform.text1.value)
replace IN contact ;
   FOR EVAL(lcField)==LookUp(bill.&lcfield, EVAL(lcField), bill.&lcfield)AND NOT EOF('bill');
   newvalue with bill.bill_value
>M
>
>Try replacing the .value(s) with variables
>
>e.g.
>
>lcTable1 = alltrim(thisform.text5.value)
>lcTable2 = alltrim(thisform.text6.value)
>lcBillValue = ?
>
>Use ( lcTable1) in 0
>Use ( lcTable2) in 0
>
>and use these.
>
>Your replace command is a mess and practically unreadable:
>
>replace FIELD with NEWVALUE in TABLE for CONDITION
>
>Now the field you are replacing with is "VAL(ALLTRIM(thisform.text5.value.bill_value))"
>
>.value is as far as it goes. You can't have ...value.bill_value (I presume that thisform.text5.value is Bill_value)
>or "thisform.text5.value.lcfield"
>
>You must sort out that replace command yourself because it crosses my eyes just to look at it, using the variables.
>
>>hi all,
>>
>>i try to run this code at command button,
>>i get error message Unknown member "value"
>>any idea
>>
>>CLOSE all
>>
>>USE alltrim(thisform.text5.value) in 0
>>USE alltrim(thisform.text6.value) in 0
>> lcField = alltrim(thisform.text1.value)
>>
>>replace IN alltrim(thisform.text6.value) ;
>>   FOR EVAL(lcField)==LookUp(alltrim(thisform.text5.value.&lcfield), EVAL(lcField), alltrim(thisform.text5.value.lcfield)) AND NOT EOF('alltrim(thisform.text5.value)');
>>val with VAL(ALLTRIM(thisform.text5.value.bill_value))
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform