Foxtable(狐表)用户栏目专家坐堂 → [求助] 窗体表下拉功能根据输入内容变化


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

主题:[求助] 窗体表下拉功能根据输入内容变化

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


加好友 发短信
等级:六尾狐 帖子:1302 积分:9451 威望:0 精华:0 注册:2015/6/30 8:46:00
[求助] 窗体表下拉功能根据输入内容变化  发帖心情 Post By:2020/4/6 20:25:00 [只看该作者]

想实现在窗体表中修改名称列的内容时,下拉会跟着改变,代码应该写在那里?

Dim cmd As new SQLCommand
cmd.C
Dim tb As Table = Tables(e.Form.Name & "_Table1")

            If e.Form.Controls("TextKhid").value > 0 Then    e.Form.Controls("Txt下拉").text = "jid = " & e.Form.Controls("TextKhid").value
            If dr.IsNull(E.DataCol.Name) = False Then
                If e.Form.Controls("Txt下拉").text > "" Then e.Form.Controls("Txt下拉").text &= " and "
                e.Form.Controls("Txt下拉").text &= " 名称 like '%" & dr(E.DataCol.Name) & "%'"
            End If

If tb.Cols.Contains("名称") Then   
    If e.Form.Controls("txt下拉").text > "" Then
        cmd.CommandText = "SEL ECT DISTINCT 名称 From {总表} WHERE " & e.Form.Controls("txt下拉").text
    Else
        cmd.CommandText = "SEL ECT DISTINCT 名称 From {总表} "
    End If
  '  MessageBox.Show(cmd.CommandText)
    Dim sdt As DataTable = cmd.ExecuteReader()
    tb.cols("名称").ComboList = sdt.GetComboListString("名称")
End If


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


加好友 发短信
等级:超级版主 帖子:105473 积分:536350 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/4/6 20:49:00 [只看该作者]

没看懂,请上传实例说明

 回到顶部