一次删除选定的多行,有提示,锁表不能删除
If Tables("表A").AllowEdit = True Then
Dim Result As DialogResult
Result = MessageBox.Show("确定要删除当前选定的行吗?", "提示", MessageBoxButtons.YesNo)
If Result = DialogResult.Yes Then
With Tables("表A")
For i As Integer = .BottomPosition To .TopPosition Step -1
.Rows(i).Delete()
Next
End With
'Tables("表A").Current.Delete
Else
e.Cancel = True '取消默认动作
End If
Else
e.Cancel = True '取消默认动作
End If