以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  <=”运算符前缺少操作数  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=124934)

--  作者:蓝蚂蚁
--  发布时间:2018/9/16 22:44:00
--  <=”运算符前缺少操作数
Dim psgs As String =e.Form.Controls("CheckedListBox1").value \'公司
Dim nforyf1 As String =e.Form.Controls("TextBox2").text \'时间是月份或年开
Dim nforyf2 As String =e.Form.Controls("TextBox3").text \'时间是月份或年始
Dim bl As String
If  nforyf1<>Nothing And nforyf2<>Nothing  Then    \'如果时间不为空
    If  nforyf1.Length=4 And nforyf2.Length=4  Then
        bl="年份"
    ElseIf nforyf1.Length=6 And nforyf2.Length=6 Then
        bl="手术月份"
    End If
    If psgs >"" Then    \'列表框不为空,即指定某个配送公司
        fTSJE001.Filter =  bl &">=\'"& nforyf1 &"\'and  bl & <=\'"& nforyf2 &"\' and 配送公司=\'"& psgs &"\'"
    Else      \'列表框为空
        fTSJE001.Filter =  bl &">=\'"& nforyf1 &"\'and  bl & <=\'"& nforyf2 &"\'"
    End If
.....
end if


代码提示错误:语法错误:“<=”运算符前缺少操作数。

请问老师 红色字体应该怎样修改?
[此贴子已经被作者于2018/9/16 22:44:54编辑过]

--  作者:有点甜
--  发布时间:2018/9/16 23:00:00
--  
    If psgs >"" Then    \'列表框不为空,即指定某个配送公司
        fTSJE001.Filter =  bl &">=\'"& nforyf1 &"\' and " & bl & " <=\'"& nforyf2 &"\' and 配送公司=\'"& psgs &"\'"
    Else      \'列表框为空
        fTSJE001.Filter =  bl &">=\'"& nforyf1 &"\' and " & bl & " <=\'"& nforyf2 &"\'"
    End If

--  作者:蓝蚂蚁
--  发布时间:2018/9/16 23:05:00
--  
完美解决