Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid row column calculation problem
Message
De
17/04/2002 00:47:33
 
 
À
16/04/2002 16:52:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00645708
Message ID:
00645798
Vues:
10
malloc=0
mnet=0
cfamt=0
If cfqty<=0
** from where comes cfqty? if is a global variable avoid use of.
=messagebox('Sorry Positive Value required...',(0+16+0),' ...')
return .f.
else
** Wy don't use the record field instead of the control.value?
cfqty=thisform.grid1.column5.text1.value
cfamt=thisform.grid1.column6.text1.value

if curreceipt.cfactp <> space(1) AND curreceipt.cfsbcd <> space(6);
AND curreceipt.cfitem <> space(10) and curreceipt.cfunit <> space(3);
AND cfqty > 0 AND cfamt > 0
*cftot=cfqty*cfamt
thisform.grid1.column7.text1.value=(thisform.grid1.column5.text1.value*thisform.grid1.column6.text1.value)
thisform.grid1.column7.text1.refresh()

endi

malloc=0
**
select curreceipt
nrec = recno()
scan for curreceipt.cfactp <> space(1) AND curreceipt.cfsbcd <> space(6);
AND curreceipt.cfitem <> space(10) and curreceipt.cfunit <> space(3);
AND cfqty > 0 AND cfamt > 0

malloc=malloc+cftot

mnet=malloc-mround

endscan
go nrec
thisform.refresh()

endi

Some notes:
- avoid using the column.text.value, use the record field value instead
- Dont't lose the record pointer
- Create a form method and then call it at the lostfocus
- Avoid the use of global variables use Forms properties instead

Hope this help

Mauricio
Be fast like the Fox
Be free like the Penguin
Se Rápido como el Zorro
Se libre como el Pingüino
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform