Foxtable(狐表)用户栏目专家坐堂 → [求助]这样的筛选如何做?[已解决]


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

主题:[求助]这样的筛选如何做?[已解决]

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/18 9:05:00 [显示全部帖子]

Dim Filter As String
With e.Form.Controls("生产单号")
    If .Value IsNot Nothing Then
        Filter = "生产单号 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("客户代号")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " and "
        End If
        Filter = Filter & "客户代号 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("已完成")
    If .checked = True Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "已完成 = true"
    End If
End With
With e.Form.Controls("未完成")
    If .checked = True Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "已完成 = false"
    End If
End With

If Filter > "" Then
    DataTables("收款主表").loadFilter = Filter
    DataTables("收款主表").load
End If

 


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/18 9:35:00 [显示全部帖子]

Dim Filter As String = "1=1"
With e.Form.Controls("生产单号")
    If .Value IsNot Nothing Then
        Filter = " and 生产单号 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("客户代号")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " and "
        End If
        Filter = Filter & "客户代号 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("已完成")
    If .checked = True Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "已完成 = true"
    End If
End With
With e.Form.Controls("未完成")
    If .checked = True Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "已完成 = false"
    End If
End With

    DataTables("生产主表").loadFilter = Filter
    DataTables("生产主表").load


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/19 17:30:00 [显示全部帖子]

以下是引用TongOk在2014-11-19 17:28:00的发言:
晕,这种问题咋没人解答啊。5月份提的,现在都没人解答图片点击可在新窗口打开查看

 

什么问题?顶上来看看。


 回到顶部