Foxtable(狐表)用户栏目专家坐堂 → value操作数后缺少操作数


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

主题:value操作数后缺少操作数

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


加好友 发短信
等级:婴狐 帖子:62 积分:691 威望:0 精华:0 注册:2011/8/15 7:01:00
value操作数后缺少操作数  发帖心情 Post By:2014/10/18 22:15:00 [只看该作者]

请各位老师指教,错在哪里,谢谢!在价值区间进行筛选时候错误,
Dim Filter As String
With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        Filter = "单位名称 Like '%" & .Value & "%'"  
    End If
End With

With e.Form.Controls("TextBox2")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "卡片类型 Like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("TextBox3")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "编码 like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("TextBox4")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "资产分类名称 Like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("TextBox5")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "资产名称 Like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("TextBox6")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "规格型号 Like '%" & .Value & "%'"
    End If
End With


With e.Form.Controls("TextBox7")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "品牌 Like '%" & .Value & "%'"
    End If
End With


With e.Form.Controls("TextBox8")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "使用部门 Like '%" & .Value & "%'"
    End If
End With


With e.Form.Controls("TextBox9")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "存放地点 Like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("TextBox12")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "会计凭证号 Like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("TextBox13")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "处置方式 Like '%" & .Value & "%'"
    End If
End With

With e.Form.Controls("DateTimePicker1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "取得日期 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("DateTimePicker2")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "取得日期 <= #" & .Value & "#"
    End If
End With
With e.Form.Controls("TextBox10")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "价值 >= .value "
    End If
End With

With e.Form.Controls("TextBox11")
    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

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/10/19 9:13:00 [只看该作者]

 Filter = Filter & "价值 >= .value "

 

 改成

 

 Filter = Filter & "价值 >= " & .value & ""


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


加好友 发短信
等级:婴狐 帖子:62 积分:691 威望:0 精华:0 注册:2011/8/15 7:01:00
  发帖心情 Post By:2014/10/19 22:08:00 [只看该作者]

谢谢老师

 回到顶部