以文本方式查看主题

-  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=127376)

--  作者:gslxgl
--  发布时间:2018/11/12 20:06:00
--  下拉筛选为什么有重复值?

Dim jtzz As WinForm.ComboBox = e.Form.Controls("住址")
Dim zh As WinForm.ComboBox = e.Form.Controls("账号")
Tables("农户表").filter="家庭住址=\'" & jtzz.text & "\' And  银行帐号=\'" & zh.text & "\'"

Dim Filter As String
With e.Form.Controls("住址")
    If .Value IsNot Nothing Then
        Filter = "家庭住址 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("账号")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "银行帐号 = \'" & .Value & "\'"
    End If
End With
If Filter > "" Then
    Tables("农户表").Filter = Filter
End If

 

 

以上代码在住址的下拉筛选中怎么有重复值


--  作者:有点蓝
--  发布时间:2018/11/12 20:12:00
--  
只能说明数据里就是有重复值。具体上传实例说明
--  作者:gslxgl
--  发布时间:2018/11/12 20:15:00
--  
数据里肯定有,我想在住址下选择时不要出现重复值,代码怎么改
--  作者:有点蓝
--  发布时间:2018/11/12 20:25:00
--  
住址的下拉选择?需要通过代码处理,如:http://www.foxtable.com/webhelp/scr/1457.htm
--  作者:gslxgl
--  发布时间:2018/11/12 20:52:00
--  
住址是组合框,能用上面代码?
--  作者:有点蓝
--  发布时间:2018/11/12 21:00:00
--  
这种:http://www.foxtable.com/webhelp/scr/0925.htm