[求助][跨表比较时间,表达式不会写,"e.DataRow("分工完成时间") "提未这部分有错,但不知道如何写
If e.DataCol.Name = "完成时间" AndAlso e.NewValue <> Nothing Then '完成时间‘是主表列
If e.NewValue < e.DataRow("安排时间") Then
msgbox("不能小于安排时间")
e.cancel = True
'''''''''''''''''''''以下是明细表表达有误,代码有误''''''''''''''''''''''''''''''''''''''''''
ElseIf e.NewValue < e.DataRow("分工完成时间") Then '分工完成时间’是明细表列
msgbox("不能小于'分工完成时间'")
e.cancel = True
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf e.newvalue > Date.today Then
msgbox("不能大于今天")
e.cancel = True
End If
End If