Foxtable(狐表)用户栏目专家坐堂 → [求助]有点甜老师


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

主题:[求助]有点甜老师

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


加好友 发短信
等级:幼狐 帖子:186 积分:1482 威望:0 精华:0 注册:2018/3/5 10:34:00
  发帖心情 Post By:2018/12/21 8:49:00 [显示全部帖子]

Dim Filter As String = "1=1"
Dim flt As String = ""

With e.Form.Controls("textbox9")
    If .Value IsNot Nothing Then
        Dim str As String = ""
        For Each s As String In .value.split(" ")
            str &= " or yxmc like '%" & s & "%'"
        Next
        flt &= str
    End If
End With
With e.Form.Controls("textbox12")
    If .Value IsNot Nothing Then
        Dim str As String = ""
        For Each s As String In .value.split(" ")
            str &= " or yxmc like '%" & s & "%'"
        Next
        flt &= str
    End If
End With
With e.Form.Controls("textbox13")
    If .Value IsNot Nothing Then
        Dim str As String = ""
        For Each s As String In .value.split(" ")
            str &= " or yxmc like '%" & s & "%'"
        Next
        flt &= str
    End If
End With
With e.Form.Controls("textbox14")
    If .Value IsNot Nothing Then
        Dim str As String = ""
        For Each s As String In .value.split(" ")
            str &= " or yxmc like '%" & s & "%'"
        Next
        flt &= str
    End If
End With
With e.Form.Controls("textbox15")
    If .Value IsNot Nothing Then
        Dim str As String = ""
        For Each s As String In .value.split(" ")
            str &= " or yxmc like '%" & s & "%'"
        Next
        flt &= str
    End If
End With
With e.Form.Controls("textbox16")
    If .Value IsNot Nothing Then
        Dim str As String = ""
        For Each s As String In .value.split(" ")
            str &= " or yxmc like '%" & s & "%'"
        Next
        flt &= str
    End If
End With
 
If flt > "" Then
      Filter &= " and (" & flt.substring(3) & ")"
End If
msgbox(filter)
Tables("高考信息查询表").Filter = Filter


老师我按的写的代码是这样的

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


加好友 发短信
等级:幼狐 帖子:186 积分:1482 威望:0 精华:0 注册:2018/3/5 10:34:00
  发帖心情 Post By:2018/12/21 9:22:00 [显示全部帖子]

非常感谢,解决啦,你太牛了,也非常热心!

 回到顶部
总数 13 上一页 1 2