左栏'); } else{ document.write('关闭左栏'); } }catch(e){alert(e);}
Foxtable(狐表)用户栏目专家坐堂 → 动态表的筛选求助


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

主题:动态表的筛选求助

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


加好友 发短信
等级:小狐 帖子:363 积分:2998 威望:0 精华:0 注册:2008/11/11 13:42:00
动态表的筛选求助  发帖心情 Post By:2009/3/6 13:58:00 [只看该作者]

我是通过以下代码实现动态表的:

Dim Filter2 As String = "[合同编号] = '" & Tables("出库主表").Current("合同编号") & "'"

现在我想在动态表中应该如下代码进行筛选,如果增加进以上的代码,可以使筛选不至于在全表中筛选,而是有以上条件了。谢谢!

Dim Filter As String
With e.Form.Controls("TextBox2")
    If .Value IsNot Nothing Then
        Filter = "[色名色号] LIKE '*" & .Value & "*'"
    End If
End With
With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " or "
        End If
        Filter = Filter & "[款号] LIKE '*" & .Value & "*'"
    End If
End With
If Filter > "" Then
    Tables("生产管理").Filter = Filter
End If



 回到顶部