以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  数值组合框问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=45424)

--  作者:初学者123456
--  发布时间:2014/1/24 23:15:00
--  数值组合框问题

数值组合框TextChanged写入代码后,当删除最后一个数字时出错.

代码是:Dim a As WinForm.NumericComboBox = e.Form.Controls("NumericComboBox1")
Tables("会员表").Filter = "电话 = \'" & a.text & "\'"


--  作者:有点甜
--  发布时间:2014/1/24 23:18:00
--  
 报什么错?试试这样

Tables("会员表").Filter = "电话 = \'" & val(a.sender.text) & "\'"

--  作者:飞天
--  发布时间:2014/1/24 23:23:00
--  
试试这个
Dim txt As String = e.Form.Controls("NumericComboBox1").value
Dim tbl As Table = Tables("会员表")
If txt = "" Then
    tbl.Filter = ""
Else
    txt = "\'%" & txt & "%\'"
    tbl.Filter = "电话 Like " & txt 
End If

--  作者:初学者123456
--  发布时间:2014/1/24 23:37:00
--  

谢谢。解决了

图片点击可在新窗口打开查看