cfields=""
FOR EACH chk as CheckBox IN thisform.Controls
IF chk.Value=1 && or .t.
cfields=cfields-chk.caption-","
ENDIF
ENDFOR
cfields=IIF(RIGHT(cfields,1)=",",left(cfields,LEN(cfields)-1),cfields)
? cfields &&这个是你要的字段列表
剩下的事情,就没什么好说的了
FOR EACH chk as CheckBox IN thisform.Controls
IF chk.Value=1 && or .t.
cfields=cfields-chk.caption-","
ENDIF
ENDFOR
cfields=IIF(RIGHT(cfields,1)=",",left(cfields,LEN(cfields)-1),cfields)
? cfields &&这个是你要的字段列表
剩下的事情,就没什么好说的了