会员登录 - 用户注册 - 网站地图 Office中国(office-cn.net),专业Office论坛
当前位置:主页 > 技巧 > Access技巧 > 数据表 > 正文

让用户看不到链接表

时间:2009-03-05 09:56 来源:网络 作者:让用户看… 阅读:
用代码将链接表的attributes属性改成1,隐藏链接表, 再生成mde文件即可
代码:
Sub asdfasdfa() '隐藏
    For Each tabdef In CurrentDb.TableDefs
        Debug.Print tabdef.Name
        Debug.Print tabdef.Attributes
        If tabdef.Attributes = 1073741824 Then
            tabdef.Attributes = 1
        End If
    Next
End Sub

Sub asdfasdfa1() '显示
    For Each tabdef In CurrentDb.TableDefs
        Debug.Print tabdef.Name
        Debug.Print tabdef.Attributes
        If tabdef.Attributes = 1073741825 Then
            tabdef.Attributes = 0
        End If
    Next
End Sub

(责任编辑:admin)

顶一下
(0)
0%
踩一下
(0)
0%
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价: