大家帮个忙
											- 统计资料表里的部门有多少个,相同的要一个.然后再统计表的部门有多少个相同的记录数,统计结果总是错误
 thisform.refresh 刷新
 release n,m,k,l 清除变量
 dime n[100],m[100] 定义字段
 k=1
 if thisform.optiongroup1.option2.value=1 如果选中这项为真
 select distinct 基本资料表.部门 from 基本资料表.dbf into ARRAY n 统计不相同的部门有多少个
 do while n[k]<>"" 判断到底有多少个部门
 k=k+1
 enddo
 for i=1 to k
 count for 基本资料表.部门=n[i] to m[i] 统计部门里有多少个相同的记录数
 endfor
 l=space(1)
 for i=1 to k 然后显示出来
 l=n[i]+":"+str(m[i])+space(1)
 endfor
 thisform.edit1.value=l
 endif



 
											





 
	    

 
	


