以文本方式查看主题

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

--  作者:maggie09
--  发布时间:2009/6/26 19:25:00
--  有关列的数据输入
能不能对列的属性进行设置,使得这一列的数据一经输入后,就不能修改,但是又不影响新的数据的输入?
--  作者:yangming
--  发布时间:2009/6/26 19:36:00
--  

 表的PrepareEdit 事件


锁定“第一列”列的非空内容
If e.Col.Name = "第一列" AndAlso e.Row.IsNull("第一列") = False Then
    e.Cancel = True
End If
[此贴子已经被作者于2009-6-26 19:37:04编辑过]

--  作者:maggie09
--  发布时间:2009/6/26 20:03:00
--  

非常感谢!


--  作者:maggie09
--  发布时间:2009/6/26 20:08:00
--  
我输入下面的公式

If e.Col.Name = "外径" AndAlso e.Row.IsNull("外径") = False Then
    e.Cancel = True
   e.Col.Name = "壳高" AndAlso e.Row.IsNull("壳高") = False Then
    e.Cancel = True
   e.Col.Name = "总高" AndAlso e.Row.IsNull("总高") = False Then
    e.Cancel = True
End If

为什么跳出下面:


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

--  作者:mr725
--  发布时间:2009/6/26 21:31:00
--  
If e.Col.Name = "外径" AndAlso e.Row.IsNull("外径") = False orelse e.Col.Name = "壳高" AndAlso e.Row.IsNull("壳高") = False orelse e.Col.Name = "总高" AndAlso e.Row.IsNull("总高") = False Then
    e.Cancel = True
End If