If DataTables("例子二").Find("[日期] Is Null And [产品] Is Not Null") Then
Result = Messagebox.Show("例子二日期未录入,是否保存.","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.No Then '如果用户选择否
e.Cancel = True '取消关闭项目
Tables("例子二").Filter = "[日期] Is Null And [产品] Is Not Null" '筛选出状态为空的记录.
MainTable = Tables("例子二") '选择表作为主表.
End If