Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid row column calculation problem
Message
From
17/04/2002 12:05:38
 
 
To
17/04/2002 00:47:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00645708
Message ID:
00645941
Views:
13
Hi,

I am novice in VFP could you guide me how to select record field value. and how I can use record pointer in grid. please elaborate.

Thanks in advance.
Sajjad

>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
Sajjad Ahmad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform