Dim Result As DialogResult Result = MessageBox.Show("Visual Basic一点不难,是不是?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Result = DialogResult.Yes Then For Each dr As DataRow In DataTables("表B").DataRows DataTables("表A").DeleteFor("姓名 = '" & dr("姓名") & "' and 居民身份号码 = '" & dr("居民身份号码") & "'") Next End If