Foxtable(狐表)用户栏目专家坐堂 → 多值加载


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

主题:多值加载

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


加好友 发短信
等级:七尾狐 帖子:1553 积分:10501 威望:0 精华:0 注册:2013/6/8 16:19:00
多值加载  发帖心情 Post By:2021/6/26 11:46:00 [显示全部帖子]

Dim Filter As String
With e.Form.Controls("店名")
    If .Value IsNot Nothing Then
        Filter = " ','+店名汉字+',' like '%," & .Value & ",%'"
    End If
End With



窗口店名有1,2,3,4,5    表什么加载不岀东西,只有单独选1才加载的了

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


加好友 发短信
等级:七尾狐 帖子:1553 积分:10501 威望:0 精华:0 注册:2013/6/8 16:19:00
  发帖心情 Post By:2021/6/26 14:12:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:qq浏览器截图20210626141342.png
图片点击可在新窗口打开查看


Dim Filter As String
With e.Form.Controls("店名")
    If .Value IsNot Nothing Then
        Filter = " ','+店名汉字+',' like '%," & .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 .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = 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 .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = 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 .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = 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
If Filter > "" Then
    DataTables("进货退货").LoadFilter = Filter
    DataTables("进货退货").Load()
End If




店名单值才可以加载,多值加载就没内容
[此贴子已经被作者于2021/6/26 14:14:42编辑过]

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


加好友 发短信
等级:七尾狐 帖子:1553 积分:10501 威望:0 精华:0 注册:2013/6/8 16:19:00
  发帖心情 Post By:2021/6/26 15:48:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:qq浏览器截图20210626141342.png
图片点击可在新窗口打开查看


Dim cmb As WinForm.ComboBox = e.Sender
Dim str As String = e.Form.Controls("店名").Value
Dim str1 As String = e.Form.Controls("开始日期").Value
Dim str2 As String = e.Form.Controls("结束日期").Value
cmb.ComboList = DataTables("进货退货").SQLGetComboListString("对账品名", "  ','+店名汉字+',' like '%," & str & ",%'      And 日期>= '" & str1 & "' And  日期<= '" & str2 & "'")


店名单值对账品名才可以取值,多值取值就没内容





[此贴子已经被作者于2021/6/26 15:49:07编辑过]

 回到顶部