Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Codes modification
Message
From
08/12/2006 00:34:11
 
 
To
07/12/2006 23:29:13
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175957
Message ID:
01175961
Views:
6
Hi,
Just have a try
Select CASH_B
Scan
        cr1 = 0
        acc_code = ""

	Scatter Memvar
	Select VOUCHERS
	Locate For Date = m.date And vou_no = m.balance;
		And vou_type = 'JV'
        SCAN WHILE Date = m.date And vou_no = m.balance;
		And vou_type = 'JV'
	  If m.dr_amount>0 AND cr_amount > cr1
             cr1 = cr_amount
             ac1 = acccode
          ENDIF
        ENDSCAN

	Select CASH_B
	Replace ACC_CODE With ac1
endscan
It is not tested code. Also, performance also depend on whether you have proper index for search expression.

HTH
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform