Foxtable(狐表)用户栏目专家坐堂 → 筛选出错


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

主题:筛选出错

美女呀,离线,留言给我吧!
susu312
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:997 积分:6752 威望:0 精华:0 注册:2018/6/8 16:17:00
筛选出错  发帖心情 Post By:2018/6/26 22:47:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看
源码:

Dim Filter As String
''统计离退休
With e.Form.Controls("cmbRetire")
    If .Value IsNot Nothing Then
        Filter = " leaOrRetire= '" & .Value & "'"
    End If
End With
''统计党龄
With e.Form.Controls("cmbPartySta")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & " partyStanding= '" & .Value & "'"
    End If
End With
''统计职务
With e.Form.Controls("cmbPos")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "retiredPost= '" & .Value & "'"
    End If
End With
'
With e.Form.Controls("cmbPoSta")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "politicalStatus= '" & .Value & "'"
    End If
End With

With e.Form.Controls("StartDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("EndDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 <= #" & .Value & "#"
    End If
End With
 '
If Filter > "" Then
    Tables("person").Filter = Filter
End If

 

 

 

老师,我有2个问题请教您

1、在筛选职务和政治面貌时,选定多个选项,选出来的就是空的?实际不应该是空的

2、需求里面有统计党龄50年以上人员,我有党员这一列 ,通过数值框可以选出50,但是可不可以给出大于,小于,等于三个选项,进行选择

 


 回到顶部