If DataTables("表A").Find("[姓名] Is Null And [接诊医生] = '" & User.Name & "' and [国籍]<>'城堡'") IsNot Nothing Then Messagebox.Show("你在""表A""表中存在没有输入姓名的记录,请删除后再关闭项目!","提示") e.Cancel = True '取消关闭项目 Tables("表A").Filter = "[姓名] Is Null And [接诊医生] = '" & User.Name & "'and [国籍]<>'城堡'" MainTable = Tables("表A") Return End If