首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Access >

怎么清空窗体里的文本,标签,组合框都清空

2012-03-18 
如何清空窗体里的文本,标签,组合框都清空?如题谢谢我做的一个窗体,有组合框,文本,标签等,想一键清除所有的

如何清空窗体里的文本,标签,组合框都清空?
如题谢谢
我做的一个窗体,

有组合框,文本,标签等,
想一键清除所有的填写值,然后重新填写

[解决办法]
For Each ER In Me.Controls
MsgBox ER.Name & ER.ControlType
If ER.ControlType = acTextBox Then
ER.Value = " "
End If
If ER.ControlType = acLabel Then
ER.Caption = "123 "
End If
Next
[解决办法]
Dim er

For Each er In Me.Controls
MsgBox er.Name & ", " & er.ControlType
If er.ControlType = acTextBox Then
er.Value = " "
End If
If er.ControlType = acLabel Then
er.Caption = " "
End If
If er.ControlType = acComboBox Then
er.Value = " "
End If
Next

热点排行