Foxtable(狐表)用户栏目专家坐堂 → [求助]


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

主题:[求助]

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


加好友 发短信
等级:一尾狐 帖子:423 积分:4231 威望:0 精华:0 注册:2009/5/16 21:42:00
[求助]  发帖心情 Post By:2012/2/8 23:14:00 [只看该作者]

Dim Filter As String
With e.Form.Controls("cmbProduct")
    If .Value IsNot Nothing Then
        Filter = "車牌  = '" & .Value & "'"
    End If
End With
With e.Form.Controls("cmbCustomer")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "打理人 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("cmbEmployee")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "編碼 = '" & .Value & "'"
    End If
End With
If Filter > "" Then
    Tables("車輛打理").Filter = filter
End If

请问如何加入到上面的查询代码中  Tables("車輛打理").Filter = "結束日期時間 Is Null"
[此贴子已经被作者于2012-2-8 23:14:48编辑过]

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


加好友 发短信 一级勋章 三级勋章 二级勋章
等级:超级版主 帖子:6318 积分:33945 威望:0 精华:10 注册:2008/8/31 20:56:00
  发帖心情 Post By:2012/2/8 23:22:00 [只看该作者]

如果是無條件加入:

If Filter > "" Then

   Tables("車輛打理").Filter = filter & " And 結束日期時間 Is Null"

End If


 回到顶部