以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 如何返回所包含的下拉列数据  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=75944)

--  作者:农村人
--  发布时间:2015/10/18 11:24:00
--  [求助] 如何返回所包含的下拉列数据
表A中.列名:"荒料编号"数据有如下:
TF15-03K0001
TF16-03K2500
TF17-03K1105

需要其返回对应的"流水编号"列的数据,

Dim a1 As String = e.Form.Controls("荒料编号").value
If a1 > "" Then
    Dim sa As String = a1.Split("-")(1)  \'以"03K为条件查询-----------------------
    sa = sa.SubString(0,3)
    Dim cmc As WinForm.ComboBox = e.form.Controls("流水编号")
    cmc.ComboList = DataTables("表A").GetComboListString("流水编号","荒料编号 like \'" & sa & "%\'" And "[打包] = \'" & False & "\'")
End If

我用以上代码,不知道是哪里不对,无法返回正确的数据.请求帮助!!!
[此贴子已经被作者于2015/10/18 11:24:44编辑过]

--  作者:大红袍
--  发布时间:2015/10/18 12:29:00
--  
cmc.ComboList = DataTables("表A").GetComboListString("流水编号","荒料编号 like \'%-" & sa & "%\'" And "[打包] = \'" & False & "\'")
--  作者:农村人
--  发布时间:2015/10/18 15:51:00
--  回复:(大红袍)cmc.ComboList = DataTables("表A")....
图片点击可在新窗口打开查看
使用代码后出现错误.
[此贴子已经被作者于2015/10/18 15:51:25编辑过]

--  作者:大红袍
--  发布时间:2015/10/18 15:55:00
--  
cmc.ComboList = DataTables("表A").GetComboListString("流水编号","荒料编号 like \'" & sa & "%\' And [打包] = false")