以文本方式查看主题

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

--  作者:bm
--  发布时间:2011/10/21 11:24:00
--  求救一个代码

Dim txt As String = e.Form.Controls("ComboBox9").Text
Dim tbl As Table = Tables("表a")
If txt = "" Then
    tbl.filter = ""
Else
    txt = "\'*" & txt & "*\'"
    tbl.filter =  "  编号 Like" & txt  
End If

这个代码是用来查找的。我想要的结果是,只是光标移动到指定行。

[此贴子已经被作者于2011-10-21 11:24:28编辑过]

--  作者:czy
--  发布时间:2011/10/21 11:56:00
--  

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

 

 


--  作者:bm
--  发布时间:2011/10/21 12:27:00
--  看不懂

Dim dr As DataRow
Dim txt As String = e.Form.Controls("ComboBox9").Text
dr = DataTables("表a").Find("[编号] = \'Text\'")
If dr IsNot Nothing Then
    Dim wz As Integer = Tables("表a").FindRow(dr)
    If wz >= 0 Then
        Tables("表a").Position = wz
    End If
End If

帮忙看看,那里不对


--  作者:狐狸爸爸
--  发布时间:2011/10/21 12:59:00
--  

Dim dr As DataRow
Dim txt As String = e.Form.Controls("ComboBox9").Text
dr = DataTables("表a").Find("[编号] = \'" & txt & "\'")
If dr IsNot Nothing Then
       Dim wz As Integer = Tables("表a").FindRow(dr)
       If wz >= 0 Then
            Tables("表a").Position = wz
       End If
End If