老师好:请教一下,关于删除行代码,如果是窗口关联表,删除的不是选择的当前行,删除的是当前表显示的第一行,请帮看看,如何删除当前选中的行
If MessageBox.Show("确定要删除该信息吗?", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
With Tables(CurrentTable.DataTable.Name) '动态获取当前表名
Dim dr As Row = Tables(CurrentTable.DataTable.Name).Current
If dr IsNot Nothing Then
If dr.IsNull("审核") = False Then
MessageBox.Show("此单已经审核,不可以删除", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
Else
dr.delete
End If
End If
End With
End If
谢谢!