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

清空窗体中各栏位资料

时 间:2007-10-27 11:15:20
作 者:竹笛   ID:8  城市:上海  QQ:2851379730点击这里给张志发消息
摘 要:清空窗体中各栏位资料
正 文:

Public Sub ClearD(frm As Form)
Dim ctl As Control
For Each ctlControl In frm.Controls
If TypeOf ctl Is acTextBox or TypeOf ctl Is acComboBox Then
ctl = ""
DoEvents
End If
Next
End Sub

此程序稍一修改便可达到更多的功能如锁定或解锁各栏位
Public Sub LockControls(frm As Form, blnSta As Boolean)
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is acTextBox or TypeOf ctl Is acComboBox Then
ctl.Enabled = blnSta
DoEvents
End If Next
End Sub

原作者:harsonliao
来 源:亿美销售系统源码

 

Private Sub clearText()
Dim ctrl As Control
For Each ctrl In Me.Form.Controls
If TypeOf ctrl Is TextBox or TypeOf ctrl Is ComboBox Then
ctrl = ""
DoEvents
End If
Next
End Sub



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

常见问答:

技术分类:

相关资源:

专栏作家

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