以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 多值 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=158655) |
|
-- 作者:qazlinle6 -- 发布时间:2020/11/27 23:44:00 -- 多值 三列数字列,1列=125,2列=126,3列=127,合并成多值列=125,126,127 如果1列=125,2列=126,3列空值,合并成多值=125,126 |
|
-- 作者:有点蓝 -- 发布时间:2020/11/28 9:12:00 -- 表达式列:[1列] + IIF(2列 is null,\'\',\',\' + 2列) + IIF(3列 is null,\'\',\',\' + 3列) |
|
-- 作者:qazlinle6 -- 发布时间:2020/11/28 10:16:00 -- 代码的呢 |
|
-- 作者:有点蓝 -- 发布时间:2020/11/28 10:22:00 -- 差不多 dim r as row = tables("A").current r("k列") = r("1列") & IIF(r.isnull("2列")l,\'\',\',\' & r("2列")) & IIF(r.isnull("3列") ,\'\',\',\' & r("3列"))
[此贴子已经被作者于2020/11/28 11:17:37编辑过]
|
|
-- 作者:qazlinle6 -- 发布时间:2020/11/28 11:07:00 -- 表a ,月日多值列 =0606,0718,1112 ComboBox1取值=06 07 11 ComboBox2取值=06 18 12 ComboBox代码什么弄
|
|
-- 作者:有点蓝 -- 发布时间:2020/11/28 11:18:00 -- 没看懂,截图说明一下 |
|
-- 作者:qazlinle6 -- 发布时间:2020/11/28 11:23:00 --
Dim cmb As WinForm.ComboBox =
e.form.Controls("ComboBox1") ComboBox1 下拉显示06 07 11 Dim cmb As WinForm.ComboBox = e.form.Controls("ComboBox2") ComboBox2 下拉显示06 18 12 |
|
-- 作者:有点蓝 -- 发布时间:2020/11/28 11:36:00 -- Dim sre As String = DataTables("表A").GetComboListString("月日多值列") Dim str() As String = sre.Replace(",","|").split("|") Dim lst1 As new List(of String) Dim lst2 As new List(of String) Dim s1,s2 As String For Each s As String In str If s.length = 4 Then s1 = s.substring(0,2) If lst1.Contains(s1) = False Then lst1.Add(s1) s2 = s.substring(2) If lst2.Contains(s2) = False Then lst2.Add(s2) End If Next If lst1.Count > 0 Then e.form.Controls("ComboBox1").ComboList = String.Join("|",lst1.ToArray) End If If lst2.Count > 0 Then e.form.Controls("ComboBox2").ComboList = String.Join("|",lst2.ToArray) End If |
|
-- 作者:qazlinle6 -- 发布时间:2020/11/28 11:55:00 -- 表a ,月日多值列 =0606,0718,1112 Dim Filter As String With e.Form.Controls("ComboBox1") If .Value IsNot Nothing Then Filter = " \',\'+月日多值列+\',\' like \'%," & .Value & ",%\' " End If End With With e.Form.Controls("ComboBox2") If .Value IsNot Nothing Then Filter = " \',\'+月日多值列+\',\' like \'%," & .Value & ",%\' " End If End With If Filter > "" Then DataTables("会员资料").LoadFilter = Filter DataTables("会员资料").Load End If 这个什么改
|
|
-- 作者:有点蓝 -- 发布时间:2020/11/28 12:04:00 -- 2个组合框都必须选择项目,否则无法查询 dim str as string = e.Form.Controls("ComboBox1").text & e.Form.Controls("ComboBox2").text Dim Filter As String= " \',\'+月日多值列+\',\' like \'%," & str & ",%\' " DataTables("会员资料").LoadFilter = Filter DataTables("会员资料").Load |