1,445
社区成员




With Me.VSFlexGrid1
For i = .Rows - .FixedRows To .FixedRows Step -1
'第一步移除全部的选中行
If .IsSelected(i) Then
.RemoveItem i
End If
Next
'第二步清空原有表格中的数据
'Delete from your_table
'第三步将现有数据批量插入数据
For i = .Rows - .FixedRows To .FixedRows Step -1
For ii = .FixedCols + 1 To .Cols - .FixedCols
strsql = strsql & "Select .textmatrix(rowindex,colindex),.textmatrix(...)…… into your_table"
Next
Next
g_cn.execute strsql
End With
Dim i As Long,a as string
With VSFlexGrid1
For i = 1 To .SelectedRows
a= .Cell(flexcpText, .SelectedRow(i - 1), 2) '设第3列是记录号
Cn.Execute ("delete from table1 where 记录号='" & a & "'")
.RemoveItem (.SelectedRow(i - 1))
Next
End With