回复 51楼 bccn0906
Use WX In 0
Use CY2 In 0
SELECT CY2
SCAN
CALCULATE MIN(r1) TO Random_TMP FOR allt(hydl)==allt(CY2.hydl) And fc=CY2.fc And Not(allt(bZ2)=='1') IN WX
SELECT WX
LOCATE FOR allt(hydl)==allt(CY2.hydl) And fc=CY2.fc And Not(allt(bZ2)=='1') AND r1=Random_TMP
If Found()
Replace bZ2 With '1' In WX
Replace WIGHT0 With WX.WEIGHT,NH0 With WX.NH0,code10 With WX.code10,NH10 With WX.Nhl In CY2
Else
=Messagebox('错误',64,'提示')
Endif
Select CY2
Endscan
Close Databases
用这个试,min(R1)的取数还是全为0,都提示错误