以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- value操作数后缺少操作数 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=58546) |
-- 作者:hubin998 -- 发布时间:2014/10/18 22:15:00 -- value操作数后缺少操作数 请各位老师指教,错在哪里,谢谢!在价值区间进行筛选时候错误, Dim Filter As String With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then Filter = "单位名称 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "卡片类型 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox3") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "编码 like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox4") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "资产分类名称 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox5") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "资产名称 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox6") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "规格型号 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox7") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "品牌 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox8") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "使用部门 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox9") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "存放地点 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox12") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "会计凭证号 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox13") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "处置方式 Like \'%" & .Value & "%\'" End If End With With e.Form.Controls("DateTimePicker1") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "取得日期 >= #" & .Value & "#" End If End With With e.Form.Controls("DateTimePicker2") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "取得日期 <= #" & .Value & "#" End If End With With e.Form.Controls("TextBox10") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "价值 >= .value " End If End With With e.Form.Controls("TextBox11") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "价值 <= .Value " End If End With If Filter > "" Then Tables("卡片").Filter = Filter End If |
-- 作者:有点甜 -- 发布时间:2014/10/19 9:13:00 -- Filter = Filter & "价值 >= .value "
改成
Filter = Filter & "价值 >= " & .value & "" |
-- 作者:hubin998 -- 发布时间:2014/10/19 22:08:00 -- 谢谢老师 |