可以换种方式
dim ss() as string = {"客户","花号",....}dim isn as boolean
for each s as string in ss
if e.Row.isnull(a)
isn=true
exit for
end if
next
if isn then
msgbox("有空值")
else
msgbox("全部没有空值")
end if
for each s as string in ss
if e.Row.isnull(a)
这里的是不是要改成
if e.Row.isnull(s)
感谢老师
If e.Col.Name = "完成" Then
Dim ss() As String = {"业务员","客户", "花号", "色位", "数量", "面料", "底布", "浆料", "调色员", "打印机台" }
Dim tf As Boolean
For Each s As String In ss
If e.Row.IsNull(s) Then
tf = True
Exit For
End If
Next
If tf Then
MessageBox.Show("需要完整输入")
e.Cancel = True
ElseIf e.Row("暂停") = True Then
MessageBox.Show("已暂停")
e.Cancel = True
End If
End If
老师,这里的MessageBox.Show("需要完整输入")怎么修改,能显示哪个是空的
If e.Col.Name = "完成" Then
Dim ss() As String = {"业务员","客户", "花号", "色位", "数量", "面料", "底布", "浆料", "调色员", "打印机台" }
Dim tf As string
For Each s As String In ss
If e.Row.IsNull(s) Then
tf = s
Exit For
End If
Next
If tf > "" Then
MessageBox.Show("需要输入: " & tf)
e.Cancel = True
ElseIf e.Row("暂停") = True Then
MessageBox.Show("已暂停")
e.Cancel = True
End If
End If