Foxtable(狐表)用户栏目专家坐堂 → 条件查询窗口的疑惑


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

主题:条件查询窗口的疑惑

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


加好友 发短信
等级:六尾狐 帖子:1325 积分:9627 威望:0 精华:0 注册:2015/6/30 8:46:00
  发帖心情 Post By:2019/6/2 11:01:00 [显示全部帖子]

Dim Filter As String
With e.Form.Controls("combobox1")
    If .Value IsNot Nothing Then
             Filter = "考试性质= '" & .Value & "'"
    End If
End With


With e.Form.Controls("combobox2")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter &= "考试年月= '" & .Value & "'"
    End If
End With


With e.Form.Controls("combobox3")
    If .Value IsNot Nothing Then
       If Filter > "" Then
            Filter = Filter & " And "
        End If
          Filter &= "班级= '" & .Value & "'"
    End If
End With


With e.Form.Controls("combobox4")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter &= "科类= '" & .Value & "'"
    End If
End With


With e.Form.Controls("combobox5")
    If .Value IsNot Nothing Then
       If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter &= "姓名= '" & .Value & "'"
    End If
End With


If Filter > "" Then
    Tables("成绩表").Filter = Filter
End If

[此贴子已经被作者于2019/6/2 11:01:21编辑过]

 回到顶部