Foxtable(狐表)用户栏目专家坐堂 → [求助]关于ComboList求助


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

主题:[求助]关于ComboList求助

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106897 积分:543698 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/5/7 14:40:00 [显示全部帖子]

要使用sql处理:http://www.foxtable.com/webhelp/topics/0696.htm

示例一

Dim cmd As New SQLCommand
Dim
 dt As DataTable
Dim
 cmb As WinForm.ComboBox
cmd.CommandText = "SELECT DISTINCT a.
合同编号 From {合同表} as a inner join (select 关联标识, max(关联序号) as 关联序号 from {合同表} group by 关联标识) as b on a.关联标识=b.关联标识 where a.关联序号=b.关联序号"

dt = cmd.ExecuteReader()
cmb = e.Form.Controls(
"ComboBox1")
cmb.ComboList= dt.GetComboListString(
"
合同编号")

上述代码可以设置在窗口的AfterLoad事件中。


 回到顶部