以文本方式查看主题

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

--  作者:cts
--  发布时间:2013/6/4 12:33:00
--  求教: 怎么编一段 按条件搜索的 代码

我想要一个按键的编码,能按照 我在 文本框 里 输入的内容 来搜索table 里的内容

 


--  作者:Bin
--  发布时间:2013/6/4 12:35:00
--  
直接在狐表中搜索不是很好吗?

你非要这样做,可以读取这个文本,然后根据文本内容搜索.

--  作者:狐狸爸爸
--  发布时间:2013/6/4 12:47:00
--  

一个文本框,一个按钮,按钮代码:

 

Dim txt As String =e.Form.Controls("文本框").Value
If txt > "" Then
   Dim r As Integer = Tables("表名").Findrow("某列 = \'" & txt & "\'", 0, False)
   If r >= 0 Then
       Tables("表名").Position = r
   End If
End If

 

建议看看:

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

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

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

 


--  作者:jiangqi20fc
--  发布时间:2013/6/19 20:22:00
--  

[此贴子已经被作者于2013-6-19 22:56:04编辑过]