以文本方式查看主题

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

--  作者:jick0526
--  发布时间:2017/9/29 17:01:00
--  if问题
老师,请问下,如果A列B列C列三列如果都为空,那么D列显示出售,否则为空,代码要怎么写,谢谢!
--  作者:有点甜
--  发布时间:2017/9/29 17:31:00
--  

如果是公式列,公式这样写 iif(A is null and B is null And C is null, \'出售\', null)


--  作者:jick0526
--  发布时间:2017/9/29 18:44:00
--  
老师,是数据列,不是表达式列
--  作者:有点蓝
--  发布时间:2017/9/29 20:22:00
--  
参考:http://www.foxtable.com/webhelp/scr/0625.htm

Select Case e.DataCol.Name
    Case "A列","B列","C列"
        e.DataRow("D列") = IIF(e.DataRow.IsNull("A列") = False AndAlso e.DataRow.IsNull("B列") = False AndAlso e.DataRow.IsNull("C列") = False ,"出售",Nothing)
End Select