Foxtable(狐表)用户栏目专家坐堂 → 有点甜等高手老师们,这两个控件怎么关联!


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

主题:有点甜等高手老师们,这两个控件怎么关联!

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/3/7 11:08:00 [显示全部帖子]

Dim Filter As String = "1=1"
Dim v1 As String = e.form.controls("textbox1").text
If v1 > "" Then
    filter &= " And zdffs >= " & v1
End If
Dim v2 As String = e.form.controls("textbox2").text
If v2 > "" Then
    filter &= " And zdffs <= " & v2
end if

With e.Form.Controls("院校地区:")
    If .Value IsNot Nothing Then
        Filter &= " and yxdq = '" & .Value & "'"
    End If
End With


With e.Form.Controls("院校地址:")
    If .Value IsNot Nothing Then
        Filter = Filter & " and yxdz = '" & .Value & "'"
    End If
End With
With e.Form.Controls("院校名称:")
    If .Value IsNot Nothing Then
        Filter = Filter & " and yxmc = '" & .Value & "'"
    End If
End With
With e.Form.Controls("专业名称:")
    If .Value IsNot Nothing Then
        Filter = Filter & " and zymc = '" & .Value & "'"
    End If
End With
With e.Form.Controls("年    度:")
    If .Value IsNot Nothing Then
       
        Filter = Filter & " and nd = '" & .Value & "'"
    End If
End With
With e.Form.Controls("科    类:")
    If .Value IsNot Nothing Then
        Filter = Filter & " and kl = '" & .Value & "'"
    End If
End With


msgbox(filter)
Tables("高考信息查询表").Filter = Filter

[此贴子已经被作者于2018/3/7 11:08:57编辑过]

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/3/7 14:45:00 [显示全部帖子]

If v2 > "" Then
    filter &= " And zdffs <= " & v2
end if

 

改成

 

If v2 > "" Then
    filter &= " And zgffs <= " & v2
end if


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/3/7 15:16:00 [显示全部帖子]

删除代码 msgbox(filter)

 回到顶部