Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unknown member
Message
From
20/03/2006 07:46:30
 
 
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:
01105773
Views:
22
hi,

i mean i use the code and i know what kind of tables i want,as programmer

but i need to do another code if any user whant to make same via form.

as I suggested: "replace FIELD with NEWVALUE in TABLE for CONDITION"?? sorry i don't undersatnd what you mean and how i can do it.
CLOSE all
   lcTable1 = alltrim(thisform.text5.value)
   lcTable2 = alltrim(thisform.text6.value) 
    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(lcTable1. bill_value)
>>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
>
>I don't know WHAT lcBillValue is supposed to be.  You here are trying to set it to a table ref - not a value
>
>>
>>    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)
>>
>
>This is a lot more readable, but why not state what is being replaced by what BEFORE you go into all the conditions?
>
>as I suggested: "replace FIELD with NEWVALUE in TABLE for CONDITION"
>
>>the old code i use it, it works
>
>So does this mean you're happy now?
>???????????????????????
>
>>
>>
>>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