以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  时间列问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=171826)

--  作者:jick0526
--  发布时间:2021/9/10 21:43:00
--  时间列问题
老师,请问下有A.B两个时间列,如果B列时间迟于A列时间,那么C列会显示,错误,代码要怎么写?
--  作者:有点蓝
--  发布时间:2021/9/11 9:06:00
--  
DataColChanged事件

If e.DataCol.Name = "A" orelse e.DataCol.Name = "B" Then
    
If e.DataRow.IsNull("A") orelse e.DataRow.IsNull("B") Then
        e.
DataRow("C") = Nothing
    
Else
        e.DataRow("C") = IIF(e.DataRow("A") < e.DataRow("B"),"错误",nothing)
    End
 If
End If
[此贴子已经被作者于2021/9/11 9:06:45编辑过]