Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Thanks! I appreciate the responses.
Sergey’s approach is the one I am familiar with from DOS days, using memory variables.
I am running into the same problem using either Sergey’s or Glenn & Tore’s method.
The problem is that TxtnTotal is carrying over the total from the previous form when I hit new.
How do I get txtnTotal to initialize to zero for a new record?
Table Junk
Key c 8
Myvalue1 n 10 2
Myvalue2 n 10 2
On form Fields
TxtMyValue1 control source Junk.Myvalue1
TxtMyValue2 control source Junk.Myvalue2
TxtnTotal control source <>
Form::Calculateit
WITH Thisform
.txtnTotal.value = .txtMyValue1.value + .txtmyvalue2.value
ENDWITH
Sergey’s Approch:
Form::Init
DODEFAULT()
Thisform.Calculateit()
TxtMyValue1::Valid
Thisform.Calulateit()
TxtMyValue2::Valid
Thisform.Calulateit()
Glenn & Tore’s Approch:
Form::Init
DODEFAULT()
Bindevent(this.txtMyValue1,”lostfocus”,this,”Calculateit”,1)
Bindevent(this.txtMyValue2,”lostfocus”,this,”Calculateit”,1)
Thisform.Calculateit()
Précédent
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