设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 1885|回复: 4
打印 上一主题 下一主题

[窗体] 如何判断子窗体中的字段是隐藏的

[复制链接]
1#
发表于 2016-6-20 11:11:49 | 显示全部楼层
本帖最后由 todaynew 于 2016-6-20 15:48 编辑

Sub GetCtrls(frm As Form)
        Dim ctrl As Control
        Dim i As Integer
        Dim m As Integer
        Dim str As String
        Set ctrls = frm.Controls
        m = 0: str = ""
        For Each ctrl In ctrls
           If ctrl.ControlType <> acLabel Then
                m = m + 1
                str = str & "第" & ctrl.TabIndex & "列字段名=" & ctrl.Name & " 是否隐藏=" & ctrl.ColumnHidden & Chr(13) & Chr(10)
           End If
        Next
        MsgBox str
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-22 23:59 , Processed in 0.107840 second(s), 23 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表