以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [讨论]drawcell内部函数问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=79177)

--  作者:cqlwsam
--  发布时间:2015/12/25 15:32:00
--  [讨论]drawcell内部函数问题
有关实验室检查的中表中均有代码:
For Each r As Row In Tables("实验室检查维护").Rows
    If e.Col.DataCol.IsNumeric AndAlso e.Col.Name = r("检验项目") Then
        If e.Row.Isnull(e.Col.Name) = False Then
            If e.Row(e.Col.Name) > r("最大值") OrElse e.Row(e.Col.Name) < r("最小值") Then
                e.Style = "检查异常"
            End If
        End If
    End If
    If  e.Col.DataCol.IsString AndAlso e.Col.Name = r("检验项目") Then
        If e.Row.Isnull(e.Col.Name)=False Then
            If e.Row(e.Col.Name) <> r("参考值")  Then
                e.Style = "检查异常"
            End If
        End If
    End If
Next

我想做成内部函数,异常值标记。代码中e用:dim tb as table=tables(args(0))来传值,或者直接引用。e用什么来替代。谢谢!


--  作者:大红袍
--  发布时间:2015/12/25 15:43:00
--  

加一行代码

 

Dim e = args(0)

 

传递的时候,第一个参数,就把e传进去。


--  作者:cqlwsam
--  发布时间:2015/12/25 17:03:00
--  
谢谢!