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


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

主题:查询

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


加好友 发短信
等级:幼狐 帖子:172 积分:2010 威望:0 精华:0 注册:2017/12/20 8:56:00
查询  发帖心情 Post By:2021/7/15 8:20:00 [只看该作者]

Dim Filter As String
With e.Form.Controls("cmbProduct")
    If .Value IsNot Nothing Then
        Filter = "客户名称 = '" & .Value & "'"
    End If
End With

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
If Filter > "" Then
    DataTables("客户明细账_Table1").LoadFilter = Filter 'And dr '设置加载条件
    DataTables("客户明细账_Table1").Load()
End If

 

这段代码如何把这个条件加进去  "经办人 = '" & User.Name & "'"


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


加好友 发短信
等级:超级版主 帖子:107440 积分:546479 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/7/15 9:04:00 [只看该作者]

Dim Filter As String = "经办人 = '" & User.Name & "'"
With e.Form.Controls("cmbProduct")
    If .Value IsNot Nothing Then
        Filter = " and 客户名称 = '" & .Value & "'"
    End If
End With

 回到顶部