Foxtable(狐表)用户栏目专家坐堂 → 请教关于实时筛选


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

主题:请教关于实时筛选

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


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/12/7 9:26:00 [显示全部帖子]

这样:

 

 

Dim txt As String = e.Form.Controls("ComboBox1").Text
Dim tbl As Table = Tables("窗口1_Table1")
Dim Filter As String
With e.Form.Controls("DateTimePicker1")
    If .Value IsNot Nothing Then
        Filter = Filter & "日期 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("DateTimePicker2")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 <= #" & .Value & "#"
    End If
End With
If txt > "" Then
    If filter > "" Then
        Filter = Filter &  "And 产品 Like '*" & txt & "*'"
    Else
        Filter= "产品 Like '*" & txt & "*'"
    End If
End If
tbl.Filter = Filter

 

另一个请参照着修改即可


 回到顶部