If DataTables("订单明细").Find("订单编号 = '" & e.DataRow("订单编号") & "'") IsNot Nothing Then Dim s As String = "此订单存在订单明细, 是否确定要删除此订单及其订单明细?" If MessageBox.Show(s,"提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.No e.Cancel= True End If End If