以文本方式查看主题

-  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=40149)

--  作者:czgtiger
--  发布时间:2013/9/10 20:25:00
--  [讨论]这段代码错在哪里啊,

If e.Col.name = "完成时间" Then
    If e.Row.Isnull("完成时间")= False Then
        If e.Row("完成时间") <=Date.Today Then
            e.style = "逾期"
        Else  If e.Row("完成时间") <Date.Today.adddays(3) Then
            e.style = "快到期"
        End If
    End If
End If

If e.Col.name = "已发货" Then
    If e.Row.Isnull("已发货") =  False Then
        If e.Row("已发货").checked = True Then
            e.Row("完成时间").style = "发货"
        End If
    End If
End If

 

 

其中,"已发货"在表中设置的是逻辑型,可是运行结果却是找不到checked ,问题出在哪里啊

 


图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2013/9/10 20:30:00
--  
改成如下

If e.Col.name = "完成时间" Then
    If e.Row.Isnull("完成时间")= False Then
        If e.Row("完成时间") <=Date.Today Then
            e.style = "逾期"
        Else  If e.Row("完成时间") <Date.Today.adddays(3) Then
            e.style = "快到期"
        End If
    End If
Else If e.Col.name = "已发货" Then
    If e.Row.Isnull("已发货") =  False Then
        If e.Row("已发货") = True Then
            e.Row("完成时间").style = "发货"
        End If
    End If
End If

[此贴子已经被作者于2013-9-10 20:30:03编辑过]

--  作者:czgtiger
--  发布时间:2013/9/10 21:09:00
--  
又显示出这样的问题,
图片点击可在新窗口打开查看此主题相关图片如下:2.jpg
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2013/9/10 21:24:00
--  
 呵呵,改错了。

If e.Col.name = "完成时间" Then
    If e.Row.Isnull("完成时间")= False Then
        If e.Row("完成时间") <=Date.Today Then
            e.style = "逾期"
        Else  If e.Row("完成时间") < Date.Today.adddays(3) Then
            e.style = "快到期"
        End If
    End If
    If e.Col.name = "已发货" Then
        If e.Row.Isnull("已发货") =  False Then
            If e.Row("已发货") = True Then
                e.style = "发货"
            End If
        End If
    End If
End If

--  作者:czgtiger
--  发布时间:2013/9/10 21:43:00
--  
非常感谢