| 发表于:2008-01-11 22:33:31 楼主 |
表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢! 以下是显示表格数据代码: with msfgrid if rs.recordcount > 0 then if .rows = 2 then for i = 1 to 4 cs = cs & .textmatrix(1, i) next i if len(cs) = 0 then .rows = rs.recordcount + 1 for j = 1 to rs.recordcount for i = 1 to 9 select case i case 1, 2, 3, 4, 5, 6 .textmatrix(j, i) = rs.fields(i - 1) & "" case 8 .textmatrix(j, i) = format(rs.fields(i - 2) & "", "0.00") end select next i rs.movenext next j cs = "" end if else .rows = .rows + rs.recordcount for j = (.rows - rs.recordcount) to (.rows - 1) for i = 1 to 9 select case i case 1, 2, 3, 4, 5, 6 .textmatrix(j, i) = rs.fields(i - 1) & "" case 8 .textmatrix(j, i) = format(rs.fields(i - 2) & "", "0.00") end select next i rs.movenext next j end if end if .col = 7 .row = 1 if .textmatrix(1, 1) <> "" then msfgrid_click else .col = 0 .row = 0 end if end with rs.close end sub 以下是删除行代码: if msfgrid.rows = 2 then: msfgrid.clear: call showfix: else: msfgrid.removeitem 表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢! |
|
|
|
|