以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]关于列名的问题,这里应该怎么写代码?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=107972)

--  作者:YDS
--  发布时间:2017/10/13 15:06:00
--  [求助]关于列名的问题,这里应该怎么写代码?

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



Dim lm As String = e.Form.Controls("CXL").Value
With e.Form.Controls("StartDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "lm >= \'" & .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 & "lm <= \'" & .Value & "\'"
    End If
End With
DataTables("订单").LoadFilter = Filter
DataTables("订单").Load()



--  作者:有点甜
--  发布时间:2017/10/13 15:20:00
--  
Dim lm As String = e.Form.Controls("CXL").Value
With e.Form.Controls("StartDate")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & lm & " >= #" & .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 & lm & " <= #" & .Value & "#"
    End If
End With
DataTables("订单").LoadFilter = Filter
DataTables("订单").Load()

--  作者:YDS
--  发布时间:2017/10/13 15:40:00
--  
问题已解决,谢谢老大