Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New method
Message
De
25/04/2005 05:33:14
 
 
À
25/04/2005 04:40:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 5
Database:
Visual FoxPro
Divers
Thread ID:
01007918
Message ID:
01007981
Vues:
17
hi,
thank you so much, it works
b.regards.
m.qasem
>Instead of the Replace.. you can use SQL Update:
>UPDATE yourtemptable set sum1=d1+d2+d3+d4+d5+d6+d7+d8+d9+d10,;
>  sum2=d11+d22+d33+d44+d55+d66+d77+d88+d99,
>  sum3=iif(d1+d2+d3+d4+d5+d6+d7+d8+d9+d10=0 or d1+d2+d3+d4+d5+d6+d7+d8+d9+d10=0,0,(sum2/sum1)*100)
>I suggest that you check for errors (if sum1 < 0 or sum2 < 0) elsewhere.
>
>>ok,
>>but sum1,d1,d2,d3..... is fields name belong to temp.table,i build mygrid via temp.table.
>>i need to SUM d1,d2,d3 to field sum1.
>>
>>REMARK:- i have sum1,sum2 and sum3,
>> the error about sum .
>>
>>
>>
>>>The AfterRowColChange event is an event of the grid, so you will only need to have the code in one place!!! Your error message, "variable'sum' is not found", means you have a typo, because the word "sum" is not in your code here.
>>>
>>>>hi,
>>>>thank you,
>>>>remark:- i can tested under vfp5 or vfp7 or vfp8
>>>>i try twise under form and ander grid1 i get error message
>>>>variable'sum' is not found,
>>>>
>>>>but when i use it at mygrid under thisform.grid1.column1.text1 && it is ok
>>>>
>>>>but have 31 columns as days
>>>>that is mean i must repeate the code under all columns,this is the problem,
>>>>
>>>>i look to another way to do that.
>>>>
>>>>b.regards.
>>>>m.qasem
>>>>
>>>>
>>>>>Put your code in the AfterRowColChange event.
>>>>>
>>>>>>hi all,
>>>>>>
>>>>>>i need help to run this code under ,for evry keypress at mygrid
>>>>>>mean run my code, if i move from column to onther,for evry column,
>>>>>>
>>>>>>maybe as new method , i try but no error message and no result,
>>>>>>
>>>>>>
>>>>>>REPLACE sum1 WITH d1 + d2 + d3+d4+d5+d6+d7+d8+d9+d10
>>>>>>REPLACE sum2 WITH d11 + d22 + d33+d44+d55+d66+d77+d88+d99
>>>>>>if sum1=0 or sum2 =0
>>>>>>    replace sum3 with 0
>>>>>>else
>>>>>>  if  sum1<0 or sum2 <0
>>>>>>    = messagebox("this is rong")
>>>>>>  else
>>>>>>    replace sum3 with (sum2/sum1)*100
>>>>>> endif
>>>>>>endif
>>>>>>
>>>>>>
>>>>>>thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform