加多个类型判断后就可以了(在本论坛主页的一篇<查询2>中学到的)
Dim ctl As Control
For Each ctl In Me.Controls
Select Case ctl.ControlType
Case acTextBox '是文本框
If ctl.Locked = False Then ctl.Locked = True
Case acComboBox '是组合框
If ctl.Locked = False Then ctl.Locked = True
Case acCheckBox '是复合框
If ctl.Locked = False Then ctl.Locked = True
'其它类型的控件不锁定
End Select
Next