Access开发培训
网站公告
·Access专家课堂QQ群号:151711184    ·Access快速开发平台下载地址及教程    ·欢迎加入Access专家课堂微信群!    ·如何快速搜索本站文章|示例|资料    
您的位置: 首页 > 技术文章 > 源码示例

【Access源码示例】让所有按钮不可用代码示例

时 间:2016-01-18 16:13:15
作 者:杜超   ID:16058  城市:江阴
摘 要:通过循环控件来实现Access所有按钮不可用代码示例。
正 文:

点击下载此附件


演   示:


源   码

Private Sub Check1_AfterUpdate()
    Dim ctl As Control
    If Me.Check1 = -1 Then    '若复选框选中
        For Each ctl In Me.Controls
            If ctl.ControlType = acCommandButton Then   '判断控件是否为按钮
                ctl.Enabled = False      '控件可用
            End If
        Next
    Else
        For Each ctl In Me.Controls
            If ctl.ControlType = acCommandButton Then
                ctl.Enabled = True
            End If
        Next

    End If
End Sub



Access软件网官方交流QQ群 (群号:483923997)       Access源码网店

常见问答:

技术分类:

相关资源:

专栏作家

关于我们 | 服务条款 | 在线投稿 | 友情链接 | 网站统计 | 网站帮助