以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]窗口的表查詢該怎麼寫(已經寫了表事件)?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=14941)

--  作者:shacool
--  发布时间:2011/12/7 16:24:00
--  [求助]窗口的表查詢該怎麼寫(已經寫了表事件)?

[求助]窗口的表查詢該怎麼寫(已經寫了表事件)?

 

Dim s1 As String
s1=e.Form.Controls("TextBox5").Value

Dim t As Table = Tables("紙品基本資料_Table1")
With Tables("紙品基本資料")
    If .Current Is Nothing Then
        t.Filter = "False"
    Else
        Forms("紙品基本資料").Controls("TextBox1").Value = Nothing
        Forms("紙品基本資料").Controls("DropBox1").Value= Nothing
        Forms("紙品基本資料").Controls("ComboBox1").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox2").Value =Nothing
        Forms("紙品基本資料").Controls("ComboBox2").Value =Nothing
        Forms("紙品基本資料").Controls("TextBox3").Value =Nothing
        Forms("紙品基本資料").Controls("ComboBox3").Value =Nothing
        Forms("紙品基本資料").Controls("TextBox4").Value =Nothing
        Forms("紙品基本資料").Controls("ComboBox4").Value =Nothing
        Forms("紙品基本資料").Controls("Label16").Text=Nothing
        Forms("紙品基本資料").Controls("ComboBox5").Value=Nothing
        Forms("紙品基本資料").Controls("DropBox2").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox6").Value=Nothing
        Forms("紙品基本資料").Controls("DropBox3").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox7").Value=Nothing
        Forms("紙品基本資料").Controls("DropBox4").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox8").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox9").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox10").Value=Nothing
        Forms("紙品基本資料").Controls("ComboBox6").Value=Nothing
        Forms("紙品基本資料").Controls("ComboBox7").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox01").Value=Nothing
        Forms("紙品基本資料").Controls("ComboBox8").Value=Nothing
        Forms("紙品基本資料").Controls("ComboBox9").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox02").Value=Nothing
        Forms("紙品基本資料").Controls("ComboBox10").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox03").Value=Nothing
        Forms("紙品基本資料").Controls("TextBox04").Value=Nothing
        Forms("紙品基本資料").Controls("Label9").Text=Nothing
        t.Filter = "[紙品代碼] Like \'%"& s1 &"%\'"
    End If
End With

 

這樣寫沒反應不知道該怎麼寫?

 

 

 


此主题相关图片如下:2.jpg
按此在新窗口浏览图片
 下载信息  [文件大小:   下载次数: ]
点击浏览该文件:管理项目2.table


--  作者:狐狸爸爸
--  发布时间:2011/12/7 16:42:00
--  

哪个表的哪个窗口,哪个事件?

设计的目的是什么?


--  作者:shacool
--  发布时间:2011/12/7 17:29:00
--  

紙品基本資料表設計了如果選擇哪行則窗口顯示選中行的資料.

 

设计的目的是什么?

設計的目的是在"碼"這個文字框中輸入文字,能查詢相關文字的紙品代碼.(減少再點查詢按鈕,彈出查詢界面的機會)
--  作者:shacool
--  发布时间:2011/12/8 11:29:00
--  

请问有办法吗


--  作者:狐狸爸爸
--  发布时间:2011/12/8 12:06:00
--  

不太能理解你的设计,只能使用副本Table,并使得各个输入框绑定到副本Table不就行了吗?

参考:

 

http://www.foxtable.com/help/topics/1906.htm

http://www.foxtable.com/help/topics/2311.htm

 


--  作者:shacool
--  发布时间:2011/12/8 17:35:00
--  

已经做好了只是有个东西错了.有个命名建议:TextBox5和TextBox05 (系统自动产生)太容易混淆.请采用一个