If Tables("hsbcusd1").Current IsNot Nothing
If Tables("hsbcusd1").Current.isnull("年份") = True Then
MessageBox.Show("年份不能为空,请输入年份!","提示", MessageBoxButtons.OK ,MessageBoxIcon.Information)
e.Cancel = True
ElseIf Tables("hsbcusd1").Current.isnull("年月") = True Then
MessageBox.Show("年月不能为空,请输入年月!","提示", MessageBoxButtons.OK ,MessageBoxIcon.Information)
e.Cancel = True
End If
End If
好像有点问题, 我输入年份,未输入年月, 窗口也关闭了
年份和年月为空,不能关闭窗口,输入年份,年月为空不能关闭窗口,输入年月,年份为空不能关闭窗口,顺序先提示输入年份,年份输入后再提示输入年月
[此贴子已经被作者于2017/1/20 23:38:08编辑过]