-- 作者:tyzl88
-- 发布时间:2018/10/7 14:11:00
--
大神出错
.NET Framework 版本:2.0.50727.8935 Foxtable 版本:2018.9.9.1 错误所在事件: 详细错误信息: 表达式包含未定义的函数调用 TrueAnd()。
代码如下,求指正。
Dim Filter As String With e.Form.Controls("GDLH") If .Value IsNot Nothing Then Filter = "工单号_年号 = \'" & .Value & "\'" End If End With With e.Form.Controls("GDYF") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "工单号_月份 = \'" & .Value & "\'" End If End With With e.Form.Controls("GDRQ") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "工单号_日期 = \'" & .Value & "\'" End If End With With e.Form.Controls("GDXH") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "工单号_序号 = \'" & .Value & "\'" End If End With With e.Form.Controls("PP") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "品牌 = \'" & .Value & "\'" End If End With With e.Form.Controls("KFM") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "客户名 = \'" & .Value & "\'" End If End With With e.Form.Controls("JSFS") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "前台结算单_结算方式 = \'" & .Value & "\'" End If End With With e.Form.Controls("JDY") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "前台结算单_接待员 = \'" & .Value & "\'" End If End With With e.Form.Controls("SKFS") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_收款方式 = \'" & .Value & "\'" End If End With With e.Form.Controls("CKZH") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_收款帐户 = \'" & .Value & "\'" End If End With With e.Form.Controls("CWSH") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = 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 With e.Form.Controls ("SKstartdate") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_收款日期 >= #" & .Value & "#" End If End With With e.Form.Controls ("SKenddate") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_收款日期 <= #" & .Value & "#" End If End With
With e.Form.controls("ydb") If e.Form.Controls("YDB").Checked= "True" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_是否打包收款 = True" End If End With
With e.Form.controls("nodb") If e.Form.Controls("NODB").Checked = "True" If Filter >"" Then Filter = Filter & "And " End If Filter = Filter & "(财务审核_是否打包收款 = False Or 财务审核_是否打包收款 Is Null)" End If End With
With e.Form.controls("alldb") If e.Form.Controls("ALLDB").Checked = "True" If Filter >"" Then Filter = Filter & "And " End If Filter = Filter & "(财务审核_是否打包收款 = False OR 财务审核_是否打包收款 = TRUE Or 财务审核_是否打包收款 Is Null)" End If End With
With e.Form.controls("YCWQR") If e.Form.Controls("YCWQR").Checked= "True" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_单据确认 = True" End If End With
With e.Form.controls("NCWQR") If e.Form.Controls("NCWQR").Checked = "True" If Filter >"" Then Filter = Filter & "And " End If Filter = Filter & "(财务审核_单据确认 = False Or 财务审核_单据确认 Is Null)" End If End With
With e.Form.controls("ALLCWQR") If e.Form.Controls("ALLCWQR").Checked = "True" If Filter >"" Then Filter = Filter & "And " End If Filter = Filter & "(财务审核_单据确认 = TRUE OR 财务审核_单据确认 = FALSE OR 财务审核_单据确认 Is Null )" End If End With
With e.Form.controls("YESSK") If e.Form.Controls("YESSK").Checked= "True" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "财务审核_已收款 = True" End If End With
With e.Form.controls("nosk") If e.Form.Controls("NOSK").Checked = "True" If Filter >"" Then Filter = Filter & "And " End If Filter = Filter & "(财务审核_已收款 = False Or 财务审核_已收款 Is Null)" End If End With
With e.Form.controls("allsk") If e.Form.Controls("ALLSK").Checked = "True" If Filter >"" Then Filter = Filter & "And " End If Filter = Filter & "(财务审核_已收款 = False OR 财务审核_已收款 = TRUE Or 财务审核_已收款 Is Null)" End If End With
If Filter > "" Then Tables("工单日报").Filter = Filter End If
|