以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  查询异常  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132448)

--  作者:有点蓝
--  发布时间:2019/3/22 11:35:00
--  
Dim Filter As String = "1=1"
With e.Form.Controls("中康编码1")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 中康编码 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("成品编码2")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 成品编码 = \'" & .Value & "\'"
    End If
End With
--  作者:有点甜
--  发布时间:2019/3/22 15:17:00
--  

改成比如

 

Dim Filter As String = "1=1"
With e.Form.Controls("姓名3")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 姓名 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("工作日期3")
    If .Value IsNot Nothing Then
        Filter = Filter & " and 工作日期 = #" & .Value & "#"
    End If
End With

 


--  作者:有点蓝
--  发布时间:2019/3/22 20:16:00
--  
你连最基本的代码逻辑都看不懂

Dim Filter As String = "1=1"