以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 筛选问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=147787) |
-- 作者:裴保民 -- 发布时间:2020/3/24 11:43:00 -- 筛选问题 Select Case xsfs Case xsfs=e.Form.Controls("mxxsRadioButton").Checked Filter = Filter & "记账日期 >= #" & StartDate & "# And [记账日期] <= #" & EndDate & "#" If Filter > "" Then Filter = Filter & " And " End If With e.Form.Controls("zhmcComboBox") If .Value IsNot Nothing AndAlso.value<>"所有账户" Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "所属账户原始值= \'" & .Value & "\'" End If End With With e.Form.Controls("zmlxComboBox") If .Value IsNot Nothing AndAlso.value<>"所有账目" Then If Filter > "" Then Filter = Filter & " And " End If If .value="支出账目" Then Filter = Filter & "交易类型 = \'支出 \'" ElseIf .value="收入账目" Filter = Filter & "交易类型 = \'收入\'" End If End If End With Tables("按账户查账窗体_azhcxTable").GrandTotal = False Tables("按账户查账窗体_azhcxTable").DataSource = DataTables("收支交易流水") Tables("按账户查账窗体_azhcxTable").SetColVisibleWidth("单号|150|记账日期|100|所属账户原始值|150|交易类型|100|收入金额|90|收入金额|90|收支分类原始值|150|经手人原始值|90|备注|200") End Select 代码那有问题呢?怎么运行后筛选出三个重复列呢?
[此贴子已经被作者于2020/3/24 11:45:58编辑过]
|
-- 作者:狐狸爸爸 -- 发布时间:2020/3/24 12:00:00 -- 1、Filter你只是合成了,并没有试用它进行筛选。 然后再发帖提问
[此贴子已经被作者于2020/3/24 12:02:21编辑过]
|
-- 作者:裴保民 -- 发布时间:2020/3/24 12:16:00 -- Select Case xsfs Case xsfs=e.Form.Controls("mxxsRadioButton").Checked Filter = Filter & "记账日期 >= #" & StartDate & "# And [记账日期] <= #" & EndDate & "#" If Filter > "" Then Filter = Filter & " And " End If With e.Form.Controls("zhmcComboBox") If .Value IsNot Nothing AndAlso.value<>"所有账户" Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "所属账户原始值= \'" & .Value & "\'" End If End With With e.Form.Controls("zmlxComboBox") If .Value IsNot Nothing AndAlso.value<>"所有账目" Then If Filter > "" Then Filter = Filter & " And " End If If .value="支出账目" Then Filter = Filter & "交易类型 = \'支出 \'" ElseIf .value="收入账目" Filter = Filter & "交易类型 = \'收入\'" End If End If End With Tables("按账户查账窗体_azhcxTable").GrandTotal = False Tables("按账户查账窗体_azhcxTable").DataSource = DataTables("收支交易流水") Tables("按账户查账窗体_azhcxTable").SetColVisibleWidth("单号|150|记账日期|100|所属账户原始值|150|交易类型|100|收入金额|90|收入金额|90|收支分类原始值|150|经手人原始值|90|备注|200") Tables("按账户查账窗体_azhcxTable").Filter = Filter End Select 加上了还是出错
|
-- 作者:有点蓝 -- 发布时间:2020/3/24 13:32:00 -- 筛选后再设置 |