以文本方式查看主题

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

--  作者:yifan3429
--  发布时间:2019/4/10 23:10:00
--  锁定数据
With  .AddInput("部门","部门:","Text")
                                .value = bm
                                .readonly = True
                            End With
                            With  .AddInput("岗位","岗位:","Text")
                                .value = gw
                                .readonly = True 11. 这种写法可以锁定
                            End With
                                                        
                            With .AddInput("日期","建档日期:*","date")
                                .Value = Date.Today
                            End With
                            .AddSelect("收客部门","客户优选:*","固装|软装|全案|其他")
                            .AddInput("推荐人","推荐人员:*","Text").Value = dr("推荐人")
                            \'.AddInput("推荐人电话","推荐电话:*","number").Value = dr("推荐人电话")
                            .AddInput("楼盘","客户楼盘:*","Text").Value = dr("楼盘").readonly = True     2. 这种写法不合适不能锁定
                            .AddInput("单元房号","单元房号*:","Text").Value = dr("单元房号")
                            .AddInput("用户姓名","客户姓名:*","Text").Value = dr("用户姓名") \'前一个"姓名"是ID,后一个"姓名"是标题
                            .AddInput("用户电话","客户电话:*","number").Value = dr("用户电话")
                            .AddInput("用户年龄","客户年龄:*","number").Value = dr("用户年龄")


调整下面的代码可以不被修改


--  作者:有点甜
--  发布时间:2019/4/10 23:20:00
--  

Dim o = .AddInput("楼盘","客户楼盘:*","Text")

o.Value = dr("楼盘")

o.readonly = True     2. 这种写法不合适不能锁定


--  作者:yifan3429
--  发布时间:2019/4/11 0:23:00
--  
有几十列 全部这么写吗  可以简写不  不然代码重复太多
--  作者:有点甜
--  发布时间:2019/4/11 9:46:00
--  

Dim o As Object

 

o = .AddInput("楼盘","客户楼盘:*","Text")

o.Value = dr("楼盘")

o.readonly = True     2. 这种写法不合适不能锁定

 

o = .AddInput("楼盘","客户楼盘:*","Text")

o.Value = dr("楼盘")

o.readonly = True     2. 这种写法不合适不能锁定