Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem in GRID having calculate column
Versions des environnements
Hello comunity
i have this code to make a calculation on my grid form changing the controlsource .
STORE "" TO clname
FOR EACH myform IN _Screen.forms
IF UPPER(myform.name)="SFT"WITH myform.Pageframe1.Page1.Cont1.Grid1
FOR i=1 TO .columnCount
IF UPPER(.Columns(i).ControlSource)="FI.U_VALHUM"
clname=.Columns(i).name
.Columns(i).ControlSource = ('((0+fi.u_nospeso-fi.u_VLDscemb)*fi.u_hum)/100')
exit
ENDIF
NEXT i
EXIT
ENDWITH
ENDIF
NEXT myform
The original controlsource of my column is a table field FI.U_VALHUM, well , if i use this code effectively i have on my column the result, but, because i change the ControlSource when i save my invoice and i close the invoice form , when a reopen my form the calculate value has dissapear , i think that because the controlsource of my calculation column don´t refer to my table field FI.U_VALHUM and saving the invoice this table field has never hold the calculate value on the table.
I don´t know if i have another possibilities to save the calculate value on my table but using this code to calculate on my column :
('((0+fi.u_nospeso-fi.u_VLDscemb)*fi.u_hum)/100')
I think if i don´t change the control source, but i use .Value propertie i can do that, my problem is how can i do this.
MAny thanks
Luis Santos
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement