以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  自动输入问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=71999)

--  作者:norwey
--  发布时间:2015/7/21 23:05:00
--  自动输入问题
如何实现当某一列的数值达到某个数值,则另一列自动填充内容?
例如,当>3000,则在“建议列”内自动输入“超标”。
当>2500,则在“建议列”内自动输入“未超标”。谢谢

--  作者:blsu33
--  发布时间:2015/7/21 23:25:00
--  
select e.col.name
case "某一列"
if e.row(“某一列”)>2500 and e.row(“某一列”)<3000 then
e.row(“建议列”)="未超标"
endif
if e.row(“某一列”)>3000 then
e.row(“建议列”)="超标
endif
end select

--  作者:大红袍
--  发布时间:2015/7/21 23:40:00
--  

 Datacolchanged事件

 

Select e.DataCol.name
    Case "某一列"
        If e.DataRow("某一列") > 2500 AndAlso e.DataRow("某一列") <= 3000 Then
            e.DataRow("建议列") = "未超标"
        End If
        If e.DataRow("某一列") > 3000 Then
            e.DataRow("建议列") = "超标"
        End If
End Select


--  作者:norwey
--  发布时间:2015/7/22 12:25:00
--  回复:(大红袍) Datacolchanged事件 ...
非常感谢,非常完美的解决了我的问题。谢谢