Foxtable(狐表)用户栏目专家坐堂 → [求助]按照实例做的筛选用不了,求帮助


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

主题:[求助]按照实例做的筛选用不了,求帮助

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


加好友 发短信
等级:婴狐 帖子:4 积分:96 威望:0 精华:0 注册:2011/7/3 17:05:00
[求助]按照实例做的筛选用不了,求帮助  发帖心情 Post By:2011/7/3 23:30:00 [显示全部帖子]

以下是按照实例做的

 

 

窗口与控件事件

 

筛选查询_Button1_Click

 

Dim Filter As String

With e.Form.Controls("ComboBox1")

    If .Value IsNot Nothing Then

        Filter = "项目进度= '" & .Value & "'"

    End If

End With

With e.Form.Controls("ComboBox2")

    If .Value IsNot Nothing Then

        If Filter > "" Then

            Filter = Filter & " And "

        End If

        Filter = Filter & "专线类型 = '" & .Value & "'"

    End If

End With

With e.Form.Controls("ComboBox3")

    If .Value IsNot Nothing Then

        If Filter >"" Then

            Filter = Filter & " And "

        End If

        Filter = Filter & "计费 = '" & .Value & "'"

    End If

End With

With e.Form.Controls("ComboBox4")

    If .Value IsNot Nothing Then

        If Filter >"" Then

            Filter = Filter & " And "

        End If

        Filter = Filter & "协议 = '" & .Value & "'"

    End If

End With

With e.Form.Controls("DateTimePicker1")

    If .Value IsNot Nothing Then

        If Filter >"" Then

            Filter = Filter & " And "

        End If

        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 Filter > "" Then

    Tables("表A").Filter = Filter

End If

 

筛选查询_Button2_Click

 

e.Form.Controls("ComboBox1").Value = Nothing

e.Form.Controls("ComboBox2").Value = Nothing

e.Form.Controls("ComboBox3").Value = Nothing

e.Form.Controls("ComboBox4").Value = Nothing

e.Form.Controls("DateTimePicker1").Value = Nothing

e.Form.Controls("DateTimePicker2").Value = Nothing

 

筛选查询_Button3_Click

 

Tables("表A").ApplyFilter = False

 

 

谁能帮我看看有什么问题


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


加好友 发短信
等级:婴狐 帖子:4 积分:96 威望:0 精华:0 注册:2011/7/3 17:05:00
  发帖心情 Post By:2011/7/4 10:35:00 [显示全部帖子]

搞定了,在家里不好使,拿到单位就好使了


 回到顶部