Foxtable(狐表)用户栏目专家坐堂 → 代码如何合并?


  共有4048人关注过本帖平板打印复制链接

主题:代码如何合并?

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


加好友 发短信
等级:超级版主 帖子:106603 积分:542186 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/5/21 9:08:00 [只看该作者]

Dim Filter As String
    With e.Form.Controls("StartDate")
        If .Value IsNot Nothing Then
            If Filter > "" Then
                Filter = Filter & " And "
            End If
            Filter = Filter & "日期 >= #" & .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 & "日期 <= #" & .Value & "#"
        End If
    End With
            If Filter > "" Then
                Filter = Filter & " And "
            End If
    Dim c As String = e.Form.Controls("ComboBox1").Text
Dim d As String = " " & e.Form.Controls("ComboBox2").Text & " "

Dim 符号 As String
If d = " like " Then
    If tbl.Cols(c).IsString = False Then
        Filter = Filter & "convert(" & c & ",'System.String')" & d & "'%" & e.Form.Controls("TextBox1").Text & "%'"
    Else
        Filter = Filter & c & d & "'%" & e.Form.Controls("TextBox1").Text & "%'"
    End If
Else
    If tbl.Cols(c).IsString Then
        符号 = "'"
    ElseIf tbl.Cols(c).IsDate Then
        符号 = "#"
        
    End If
    
  Filter = Filter & c & d & 符号 & e.Form.Controls("TextBox1").Text & 符号
    
End If
    Tables("模糊查询_订单").Filter = Filter 

 回到顶部
总数 22 1 2 3 下一页