表中 L1列 手工输入的有:DM为05、06、07、A01——A18、71、72、73、74、75
自动计算并输入L1列 的有:DM为01=05+06+07
DM为00=A01+A02+A03+A04
DM为22=71+72+73+74+75
DM为72=A05+A06+A07+A08
……
最后审核关系:L1列 DM为01=DM为00=DM为22 并提示错误
这是一张人数表
[此贴子已经被作者于2016-3-11 12:01编辑过]
CLEAR CLOSE DATABASE USE RSB *SELECT L1 FROM RSB INTO ARRAY ASJ COPY TO ARRAY ASJ FIELDS L1 *LIST MEMORY LIKE ASJ ASJ[2]=ASJ[3]+ASJ[4]+ASJ[5] ASJ[6]=ASJ[7]+ASJ[8]+ASJ[9]+ASJ[10] ASJ[13]=ASJ[14]+ASJ[15]+ASJ[16]+ASJ[17] ASJ[20]=ASJ[21]+ASJ[22]+ASJ[23]+ASJ[24]+ASJ[25]+ASJ[26]+ASJ[27]+ASJ[28] ASJ[11]=ASJ[12]+ASJ[13,2]+ASJ[18]+ASJ[19]+ASJ[20] REPLACE L1 WITH ASJ[2] FOR DM='01' REPLACE L1 WITH ASJ[6] FOR DM='00' REPLACE L1 WITH ASJ[13] FOR DM='72' REPLACE L1 WITH ASJ[20] FOR DM='75' REPLACE L1 WITH ASJ[11] FOR DM='22' * 显示三部分数据计算结果分别为 ?ASJ[2],ASJ[6],ASJ[11] IF ASJ[2]<>ASJ[6] OR ASJ[6]<>ASJ[11] =MESSAGEBOX("L1列:"+" DM[01] "+STR(ASJ[2])+" DM[00] "+STR(ASJ[6])+" DM[22] "+STR(ASJ[11]),0+64,"提示") ELSE =MESSAGEBOX( "审核通过,期末人数"+STR(ASJ[2],6),0+64,"提示") ENDIF