引用自 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 |