Foxtable(狐表)用户栏目专家坐堂 → [求助]取消查询结果中的空值?


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

主题:[求助]取消查询结果中的空值?

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


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/10/10 21:08:00 [显示全部帖子]

Dim Filter As String = "[报告编号] <> '' and [报告编号] is not null "
With e.Form.Controls("combobox6")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 检测部门 = '" & .Value & "'"
    End If
    
End With
With e.Form.Controls("dtp7")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 报告日期 >= #" & .Value & "#"
    End If
    
End With
With e.Form.Controls("dtp8")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 报告日期 <= #" & .Value & "#"
    End If
End With
Dim txt As String = e.Form.Controls("TextBox12").Text
If txt > "" Then
    txt = "'%" & txt & "%'"
    Filter = Filter & "and 委托单位 Like " & txt & " "
End If
Tables("form_table5").Filter = Filter

 回到顶部