以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  positonChanged代码的写法  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=120896)

--  作者:zhangchi96
--  发布时间:2018/6/25 22:29:00
--  positonChanged代码的写法

表“乘车线路”的positonChanged代码的写法:(存在错误)

 


Dim 驾驶员姓名 As WinForm.label = e.Form.Controls("驾驶员姓名")
 

Dim r As Row = e.Table.Current

If r IsNot Nothing Then
     驾驶员姓名.text = r("驾驶员_姓名")
End If

 

 

请教老师,这个代码如何写,说明书中实在找不到例子可用了。

 


--  作者:有点蓝
--  发布时间:2018/6/25 22:33:00
--  
提示什么错误?试试

If Forms("窗口名称").Opened
    
    Dim 驾驶员姓名 As WinForm.label = Forms("窗口名称").Controls("驾驶员姓名")
    
    Dim r As Row = e.Table.Current
    If r IsNot Nothing Then
        驾驶员姓名.text = r("驾驶员_姓名")
    End If
End If