| 发表于:2007-02-03 00:13:32 楼主 |
批量删除mshflexgrid里所选定的数据,数据库里是删除了但mshflexgrid里没有即时刷新 private sub mshflexgrid1_click() '选中删除的行 with mshflexgrid1 .textmatrix(.rowsel, 0) = "√ " end with end sub private sub command9_click() dim i as long with mshflexgrid1 for i = 1 to .rows - 1 '循环删除选种的行 if .textmatrix(i, 0) = "√ " then '删除选中的行 .textmatrix(i, 0) = "× " adodc1.recordset.activeconnection.EXECute "delete from data where " & adodc1.recordset.fields(0).name & "= ' " & trim(mshflexgrid1.textmatrix(i, 1)) & " ' " end if next i end with end sub |
|
|
|
|