开发者

ms-access: clear text in all controls with one click

i have some comboboxes and some textboxes on a form

i would like to clear all of them with开发者_如何学JAVA one line of code. is that possible?

something like all_controls.text=""


Not with one line of code. You will have to walk through all of the controls with a loop.

Dim ctl As Control
For Each ctl In Me.Controls
    If (ctl.ControlType = acTextBox) Then
        ctl.Value = Null
    End If
Next ctl

http://www.tek-tips.com/faqs.cfm?fid=5010

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜