-- 作者:cwm591825
-- 发布时间:2015/11/6 9:56:00
-- CheckedComboBox查询
老师:
早上好!请帮忙看看下面代码,运行时显示:
.NET Framework 版本:2.0.50727.5456 Foxtable 版本:2014.11.11.1 错误所在事件:窗口,机房生产排期,Button5,Click 详细错误信息: 未找到类型“String”的公共成员“Text”。
对于CheckedComboBox查询是第一次写代码,请帮忙看看哪里不对,谢谢!
Tables("机房生产排期").DataTable.Load() Dim Filter As String With e.Form.Controls("DateTimePicker2") If .Value IsNot Nothing Then Filter = Filter & "日期 >= #" & .Value & "#" End If End With With e.Form.Controls("DateTimePicker3") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "日期 <= #" & .Value & "#" End If End With With e.Form.Controls("ComboBox9") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "机台编号 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox10") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "姓名 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox11") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "型号 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox12") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "模具区分 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox13") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "规格 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox14") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "颜色 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox15") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "材料 = \'" & .Value & "\'" End If End With With e.Form.Controls("CheckedComboBox1") If .Value.Text IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "班次 In ( \'" & .Value.Text.replace(",","\',\'") & "\')" End If End With
If Filter > "" Then Tables("机房生产排期").Filter = Filter End If
|