以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  RelationTable控件哪去了  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=2172)

--  作者:lkqing
--  发布时间:2009/3/21 14:08:00
--  RelationTable控件哪去了
3月16号的更新是否将RelationTable(关联表)的控件搞丢了。
--  作者:czy
--  发布时间:2009/3/21 16:46:00
--  
Table就是。
--  作者:lkqing
--  发布时间:2009/3/21 17:23:00
--  
控件名称变化了,原先的设置就麻烦了, 呜呜......
--  作者:czy
--  发布时间:2009/3/21 19:45:00
--  
以下是引用lkqing在2009-3-21 17:23:00的发言:
控件名称变化了,原先的设置就麻烦了, 呜呜......


原先设置过的不用去管它,一样的。


--  作者:lkqing
--  发布时间:2009/3/21 20:05:00
--  
不管它不行吧,看错误提示: “找不到名称为“RelationTable1”的控件!”
--  作者:czy
--  发布时间:2009/3/21 20:15:00
--  

Table控件名称也是RelationTable,我刚才打开了论坛上有插入关联表的文件,测试没有任何问题。


--  作者:lkqing
--  发布时间:2009/3/21 21:19:00
--  
请教 CZY超级版主 ,原来以下编码都行的,更新后就出现了以上情况 e.Form.Controls("RelationTable1").Visible = True Dim s1 As String =e.Form.Controls("TextBox1").Value Dim s2 As String s2 = s1.SubString(0,4) If s2 = "6001" Then e.Form.Controls("RelationTable2").Visible = True e.Form.Controls("RelationTable14").Visible = True e.Form.Controls("RelationTable20").Visible = True e.Form.Controls("RelationTable23").Visible = True e.Form.Controls("RelationTable26").Visible = True ElseIf s2 = "6002" Then e.Form.Controls("RelationTable3").Visible = True e.Form.Controls("RelationTable15").Visible = True e.Form.Controls("RelationTable22").Visible = True e.Form.Controls("RelationTable24").Visible = True e.Form.Controls("RelationTable27").Visible = True ElseIf s2 = "6003" Then e.Form.Controls("RelationTable3").Visible = True e.Form.Controls("RelationTable15").Visible = True e.Form.Controls("RelationTable22").Visible = True e.Form.Controls("RelationTable24").Visible = True e.Form.Controls("RelationTable27").Visible = True e.Form.Controls("RelationTable21").Visible = True ElseIf s2 = "6004" Then e.Form.Controls("RelationTable3").Visible = True e.Form.Controls("RelationTable15").Visible = True e.Form.Controls("RelationTable22").Visible = True e.Form.Controls("RelationTable24").Visible = True e.Form.Controls("RelationTable27").Visible = True e.Form.Controls("RelationTable21").Visible = True ElseIf s2 = "6005" Then e.Form.Controls("RelationTable4").Visible = True e.Form.Controls("RelationTable9").Visible = True e.Form.Controls("RelationTable28").Visible = True e.Form.Controls("RelationTable24").Visible = True e.Form.Controls("RelationTable27").Visible = True ElseIf s2 = "6006" Then e.Form.Controls("RelationTable4").Visible = True e.Form.Controls("RelationTable9").Visible = True e.Form.Controls("RelationTable28").Visible = True e.Form.Controls("RelationTable24").Visible = True e.Form.Controls("RelationTable27").Visible = True ElseIf s2 = "6007" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable17").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6008" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable10").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6009" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable17").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6010" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable17").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6011" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable17").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6012" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable17").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6013" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable19").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6014" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable16").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6015" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable19").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6016" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable19").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6017" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable18").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6018" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable19").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6019" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable19").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6020" Then e.Form.Controls("RelationTable5").Visible = True e.Form.Controls("RelationTable11").Visible = True e.Form.Controls("RelationTable19").Visible = True e.Form.Controls("RelationTable8").Visible = True e.Form.Controls("RelationTable25").Visible = True ElseIf s2 = "6100" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6101" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6102" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6103" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6104" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6105" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6106" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6107" Then e.Form.Controls("RelationTable6").Visible = True e.Form.Controls("RelationTable12").Visible = True e.Form.Controls("RelationTable29").Visible = True e.Form.Controls("RelationTable31").Visible = True e.Form.Controls("RelationTable33").Visible = True ElseIf s2 = "6121" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6122" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6123" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6124" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6125" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6126" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6127" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True ElseIf s2 = "6128" Then e.Form.Controls("RelationTable7").Visible = True e.Form.Controls("RelationTable13").Visible = True e.Form.Controls("RelationTable30").Visible = True e.Form.Controls("RelationTable32").Visible = True e.Form.Controls("RelationTable34").Visible = True End If
--  作者:lkqing
--  发布时间:2009/3/21 21:49:00
--  
回到2008.12.23的更新(正好手头有),以上编码完全正常通过,想白了几根头发,也没想通,唉....
--  作者:gdlgh
--  发布时间:2009/3/21 23:40:00
--  
上面的编码真恐怖呀!!图片点击可在新窗口打开查看
--  作者:mr725
--  发布时间:2009/3/22 1:12:00
--  

不恐怖,就像下面这样:
e.Form.Controls("RelationTable1").Visible = True

Dim s1 As String =e.Form.Controls("TextBox1").Value
Dim s2 As String s2 = s1.SubString(0,4)


If s2 = "6001" Then e.Form.Controls("RelationTable2").Visible = True
e.Form.Controls("RelationTable14").Visible = True
e.Form.Controls("RelationTable20").Visible = True
e.Form.Controls("RelationTable23").Visible = True
e.Form.Controls("RelationTable26").Visible = True


ElseIf s2 = "6002" Then
.......
中间都一样的~~RelationTable 太多了而已
.......

End If 

[此贴子已经被作者于2009-3-22 1:13:10编辑过]