Foxtable(狐表)用户栏目专家坐堂 → [求助]


  共有2736人关注过本帖树形打印复制链接

主题:[求助]

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/10/19 16:37:00 [显示全部帖子]

Dim tbl As Table = Tables("查询_Table1")
Dim txt As String = e.Form.Controls("TextBox1").TEXT
If txt > "" Then
    txt = "'%" & txt & "%'" 
    tbl.Filter = "(XM Like " & txt & " Or TXRY Like " & txt & ")"
End If


With e.Form.Controls("KS")
    If .Value IsNot Nothing Then
        If tbl.Filter >"" Then
            tbl.Filter = Filter & " And "
        End If
        tbl.Filter = Filter & "FSSJ >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("JS")
    If .Value IsNot Nothing Then
        If tbl.Filter >"" Then
            tbl.Filter = Filter & " And "
        End If
        tbl.Filter = Filter & "FSSJ <= #" & .Value & "#"
    End If
End With


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/10/19 17:11:00 [显示全部帖子]

Dim filter As String = ""
Dim tbl As Table = Tables("查询_Table1")
Dim txt As String = e.Form.Controls("TextBox1").TEXT
If txt > "" Then
    txt = "'%" & txt & "%'" 
    Filter = "(XM Like " & txt & " Or TXRY Like " & txt & ")"
End If


With e.Form.Controls("KS")
    If .Value IsNot Nothing Then
        If filter >"" Then
            filter = Filter & " And "
        End If
        filter = Filter & "FSSJ >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("JS")
    If .Value IsNot Nothing Then
        If filter >"" Then
            filter = Filter & " And "
        End If
        filter = Filter & "FSSJ <= #" & .Value & "#"
    End If
End With
tbl.filter = filter


 回到顶部