Foxtable(狐表)用户栏目专家坐堂 → 查询表


  共有2653人关注过本帖平板打印复制链接

主题:查询表

美女呀,离线,留言给我吧!
采菊东篱下
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1881 积分:10374 威望:0 精华:0 注册:2019/4/6 8:45:00
  发帖心情 Post By:2021/4/19 18:13:00 [只看该作者]

改为这样:
With e.Form.Controls("ComboBox1")
    If .Value = e.Form.Controls("ComboBox1").Items(1)
        Dim Filter As String
        Filter = "分类 = '" & .Value & "'"
        With e.Form.Controls("StartDate")
            If .Value IsNot Nothing Then
                If Filter >"" Then
                    Filter = Filter & " And "
                End If
                Filter = Filter & "缴费_月租_起计日期 >= #" & .Value & "#"
            End If
        End With
        With e.Form.Controls("EndDate")
            If .Value IsNot Nothing Then
                If Filter >"" Then
                    Filter = Filter & " And "
                End If
                Filter = Filter & "缴费_月租_止计日期 <= #" & .Value & "#"
            End If
        End With
        With e.Form.Controls("DropBox1")
            If .Value IsNot Nothing Then
                If Filter > "" Then
                    Filter = Filter & " And "
                End If
                Filter = Filter & "车牌号码 = '" & .Value & "'"
            End If
        End With
        Messagebox.show(Filter)
        With DataTables("安所属日期查询_Table1")
            If Filter > "" Then
                LockBaseMainForm() '锁定主界面
                .StopRedraw()
                .LoadFilter = Filter
                .Load()
                .ResumeRedraw()
                UnLockBaseMainForm() '解锁主界面
            End If
        End With
    ElseIf .Value = e.Form.Controls("ComboBox1").Items(2)
        Dim Filter1 As String
        Filter1 = "分类 = '" & .Value & "'"
        With e.Form.Controls("StartDate")
            If .Value IsNot Nothing Then
                If Filter1 >"" Then
                    Filter1 = Filter1 & " And "
                End If
                Filter1 = Filter1 & "缴费_临时停放_起计时间 >= #" & .Value & "#"
            End If
        End With
        With e.Form.Controls("EndDate")
            If .Value IsNot Nothing Then
                If Filter1 >"" Then
                    Filter1 = Filter1 & " And "
                End If
                Filter1 = Filter1 & "缴费_临时停放_止计时间 <= #" & .Value & "#"
            End If
        End With
        With e.Form.Controls("DropBox1")
            If .Value IsNot Nothing Then
                If Filter1 > "" Then
                    Filter1 = Filter1 & " And "
                End If
                Filter1 = Filter1 & "车牌号码 = '" & .Value & "'"
            End If
        End With
        Messagebox.show(Filter1)
        With DataTables("安所属日期查询_Table1")
            If Filter1 > "" Then
                LockBaseMainForm() '锁定主界面
                .StopRedraw()
                .LoadFilter = Filter1
                .Load()
                .ResumeRedraw()
                UnLockBaseMainForm() '解锁主界面
            End If
        End With
    End If
End With
只弹出一个窗口

图片点击可在新窗口打开查看此主题相关图片如下:41903.png
图片点击可在新窗口打开查看


 回到顶部
总数 16 1 2 下一页