以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  为什么切换页面标签后,按钮不能用了?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=190012)

--  作者:hongyaoyu
--  发布时间:2024/1/11 7:50:00
--  为什么切换页面标签后,按钮不能用了?
窗口里面的页面标签,切换到其中的某个标签后,按钮和筛选器对表都不起作用了?不切换到这些标签的时候还没有问题。
按钮的语句:
With Tables("绿建国标条款")
    .Position = .Position + 1
End With
筛选器的语句:
Dim Filter As String
With e.Form.Controls("tx")
    If .Value IsNot Nothing Then
        Filter = "条文归属 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("qd")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "条文分类 = \'" & .Value & "\'"
    End If
End With

With e.Form.Controls("bj")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        Filter = Filter & "标记 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("zy")
    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("ny")
    If .Value IsNot Nothing Then
        Filter = "难易度 = \'" & .Value & "\'"
    End If
End With
If Filter > "" Then
    Tables("绿建国标条款").Filter = Filter


--  作者:hongyaoyu
--  发布时间:2024/1/11 8:10:00
--  
找到原因了,把表属性设为附表,也不要频繁刷新表就没有问题了