Foxtable(狐表)用户栏目专家坐堂 → CheckedComboBox查询


  共有2179人关注过本帖树形打印复制链接

主题:CheckedComboBox查询

帅哥哟,离线,有人找我吗?
cwm591825
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:37 积分:702 威望:0 精华:0 注册:2015/6/14 11:27:00
CheckedComboBox查询  发帖心情 Post By:2015/11/6 9:56:00 [只看该作者]

老师:

早上好!请帮忙看看下面代码,运行时显示:

.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


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/11/6 10:32:00 [只看该作者]

With e.Form.Controls("CheckedComboBox1")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter  = Filter & " And "
        End If
        Filter  = Filter & "班次 In ( '" & .Value.replace(",","','") & "')"
    End If
End With

 回到顶部
帅哥哟,离线,有人找我吗?
cwm591825
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:37 积分:702 威望:0 精华:0 注册:2015/6/14 11:27:00
  发帖心情 Post By:2015/11/6 10:50:00 [只看该作者]

谢谢!


 回到顶部