遍历窗体控件-Aaron
Access软件网QQ交流学习群(群号码198465573),欢迎您的加入!
首页 >技术文章> Access数据库-窗体/数据页


遍历窗体控件

发表时间:2011/6/17 6:46:55 评论(1) 浏览(18139)  评论 | 加入收藏 | 复制
   
摘 要:遍历窗体控件
正 文:

引用自 http://blog.163.com/fenix_blog/blog/static/1410483472011289829785/

基于office 2010

Dim ctl As Access.Control

For Each ctl In Me.Controls

If ctl.ControlType = acTextBox Then ctl.IMEMode = 2 '将窗体上所有文本框的输入法关掉

Next

可以使用.ControlType,对某一类控件进行操作。

附:ControlType 表

AcControlType 控件
acAttachment 附件
acBoundObjectFrame 绑定对象框
acCheckBox 复选框
acComboBox 组合框
acCommandButton 命令按钮
acCustomControl ActiveX(自定义)控件
acEmptyCell 网格
acImage 图像
acLabel 标签
acLine 线条
acListBox 列表框
acNavigationButton 导航按钮
acNavigationControl 导航控件
acObjectFrame 未绑定对象框
acOptionButton 选项按钮
acOptionGroup 选项组
acPage
acPageBreak 分页符
acRectangle 矩形
acSubform 子窗体/子报表
acTabCtl 选项卡
acTextBox 文本框
acToggleButton 切换按钮
acWebBrowser


Access软件网交流QQ群(群号:198465573)
 
 相关文章
[access查询]遍历--access常用手段  【todaynew  2009/12/14】
【access小品】遍历天下 不畏浮云  【todaynew  2010/4/5】
VBA遍历文件夹和子文件夹中所有文件  【欢乐小爪  2012/3/22】
VBA遍历文件夹常用有三种方法  【风行  2012/5/26】
FSO遍历文件夹,按时间排序,删除早期文件  【风行  2012/5/28】
常见问答
技术分类
相关资源
文章搜索
关于作者

Aaron

文章分类

文章存档

友情链接